/* Public site for nyro.ink — served straight from nginx, no build step.
   Kept dependency-free on purpose: the page a payment provider's moderator opens
   must not be able to break because of a CDN or a font host. Every effect below
   is plain CSS on system fonts — no webfont, no icon set, no framework.

   This file is the shared shell: tokens, typography, header, footer, panels and
   tables. It styles the legal pages (offer.html, privacy.html) on its own; the
   landing adds landing.css on top. */

:root {
  color-scheme: dark;

  --bg: #04060b;
  --bg-soft: #070b13;
  --panel: rgba(10, 14, 22, 0.72);
  --panel-solid: #0a0e16;
  --panel-2: rgba(16, 22, 34, 0.66);

  --text: #e8f2ff;
  --muted: #93a0bd;
  --dim: #6c7793;

  --line: rgba(122, 196, 255, 0.14);
  --line-2: rgba(122, 196, 255, 0.26);
  --line-hot: rgba(0, 234, 255, 0.55);

  --cyan: #00eaff;
  --magenta: #ff2fb3;
  --violet: #7b5cff;
  --lime: #b6ff3c;
  --warn: #ffb020;
  --ok: #2fe7a0;

  --accent: var(--cyan);
  --accent-text: #04060b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shell: 1160px;
  --nav-h: 62px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 var(--font-sans);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* --- Backdrop: neon haze + engineering grid + CRT scanlines ------------------
   Three fixed layers, all painted from gradients so nothing is downloaded. */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42vmax 42vmax at 12% 4%, rgba(0, 234, 255, 0.16), transparent 62%),
    radial-gradient(38vmax 38vmax at 88% 10%, rgba(255, 47, 179, 0.14), transparent 60%),
    radial-gradient(46vmax 46vmax at 70% 86%, rgba(123, 92, 255, 0.14), transparent 64%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(122, 196, 255, 0.055) 1px, transparent 1px) 0 0 / 100% 46px,
    linear-gradient(90deg, rgba(122, 196, 255, 0.055) 1px, transparent 1px) 0 0 / 46px 100%;
  -webkit-mask-image: radial-gradient(130vmax 90vmax at 50% -10%, #000 15%, transparent 78%);
  mask-image: radial-gradient(130vmax 90vmax at 50% -10%, #000 15%, transparent 78%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background: radial-gradient(120vmax 80vmax at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

::selection { background: rgba(0, 234, 255, 0.3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Layout ------------------------------------------------------------------ */
.wrap { max-width: 880px; margin: 0 auto; padding: 34px 20px 72px; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 20px; width: 100%; }

/* --- Typography -------------------------------------------------------------- */
h1 {
  font-size: clamp(30px, 5.4vw, 46px);
  line-height: 1.12;
  margin: 0 0 16px;
  letter-spacing: -0.025em;
  font-weight: 800;
}

h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  margin: 44px 0 14px;
  letter-spacing: -0.015em;
  font-weight: 700;
}

h3 { font-size: 17px; margin: 26px 0 8px; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }

.lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
  margin-bottom: 26px;
  max-width: 68ch;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #7ff5ff; text-decoration: underline; text-underline-offset: 3px; }
strong { color: #fff; font-weight: 650; }

ul { margin: 0 0 14px; padding-left: 20px; }
li { margin-bottom: 8px; }
ul li::marker { color: var(--cyan); }

.muted { color: var(--muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.small { font-size: 14px; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}

/* Section label: "// РАЗДЕЛ" in neon monospace. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
  box-shadow: 0 0 8px var(--cyan);
}

/* --- Header ------------------------------------------------------------------ */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 6, 11, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease, border-color 0.25s ease;
}

header.site.is-scrolled {
  background: rgba(4, 6, 11, 0.92);
  border-bottom-color: var(--line-2);
  box-shadow: 0 12px 40px -28px rgba(0, 234, 255, 0.9);
}

.nav-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}

.logo:hover { text-decoration: none; color: var(--text); }
.logo span { color: var(--cyan); text-shadow: 0 0 14px rgba(0, 234, 255, 0.75); }

.logo-mark {
  width: 22px;
  height: 22px;
  margin-right: 9px;
  align-self: center;
  filter: drop-shadow(0 0 6px rgba(0, 234, 255, 0.65));
}

header.site nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

header.site nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 11px;
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

header.site nav a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

header.site nav a:hover { color: var(--text); text-decoration: none; }
header.site nav a:hover::after { transform: scaleX(1); }

.nav-cta { margin-left: 6px; }

header.site nav a.btn { color: #03060c; }
header.site nav a.btn:hover { color: #ffffff; }
header.site nav a.btn.ghost { color: var(--cyan); }
header.site nav a.btn.ghost:hover { color: #ffffff; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }

/* --- Buttons ----------------------------------------------------------------- */
.btn {
  --notch: 11px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #03060c;
  background: linear-gradient(112deg, #00eaff 0%, #49b6ff 42%, #ff2fb3 100%);
  background-size: 200% 100%;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  box-shadow: 0 0 0 rgba(0, 234, 255, 0), 0 10px 30px -14px rgba(0, 234, 255, 0.9);
  transition: background-position 0.45s ease, box-shadow 0.25s ease, transform 0.15s ease, filter 0.25s ease;
}

.btn:hover {
  background-position: 100% 0;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 0 22px -4px rgba(255, 47, 179, 0.55), 0 14px 34px -14px rgba(0, 234, 255, 0.9);
}

.btn:active { transform: translateY(0); }

.btn.ghost {
  color: var(--cyan);
  background: rgba(0, 234, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-hot);
}

.btn.ghost:hover {
  color: #ffffff;
  background: rgba(0, 234, 255, 0.14);
  box-shadow: inset 0 0 0 1px var(--cyan), 0 12px 30px -18px rgba(0, 234, 255, 0.9);
}

.btn.small { padding: 10px 20px; font-size: 11.5px; --notch: 7px; }
.btn.block { width: 100%; }

/* --- Panels ------------------------------------------------------------------ */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* HUD corner brackets — two pseudo-elements, no images. */
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  transition: border-color 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.panel::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
}

.panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--magenta);
  border-bottom: 1px solid var(--magenta);
}

.panel:hover::before,
.panel:hover::after { width: 22px; height: 22px; }

/* --- Tables ------------------------------------------------------------------ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 500;
  width: 40%;
}

tr:last-child th,
tr:last-child td { border-bottom: 0; }

tbody tr:hover td,
table tr:hover td { background: rgba(0, 234, 255, 0.035); }

/* --- Steps (legal pages + landing fallback) ---------------------------------- */
.steps { counter-reset: s; list-style: none; padding: 0; }

.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
}

.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-hot);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  background: rgba(0, 234, 255, 0.07);
  box-shadow: 0 0 18px -6px rgba(0, 234, 255, 0.8);
}

/* --- Card-scheme badges ------------------------------------------------------
   Drawn inline rather than loaded as images: these pages must render with no
   external request at all, and a moderator opening the site while a CDN is
   unreachable must still see which cards are accepted. Kept on a white chip —
   that is how the marks are specified to appear. */
.paycards { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 18px; }

.paycard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 62px;
  height: 34px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #d9dce3;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.paycard-visa { color: #1a1f71; font-style: italic; letter-spacing: 0.06em; }
.paycard-mir { color: #0f754e; letter-spacing: 0.04em; }
.paycard-mc { color: #231f20; font-weight: 600; letter-spacing: 0.01em; }
.paycard svg { display: block; }

/* --- Notices ----------------------------------------------------------------- */
.todo {
  background: rgba(255, 176, 32, 0.08);
  border: 1px solid rgba(255, 176, 32, 0.35);
  color: #ffd48a;
  border-radius: 4px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 14px;
}

/* --- Footer ------------------------------------------------------------------ */
footer.site {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0, 234, 255, 0.04));
  color: var(--muted);
  font-size: 14px;
}

footer.site .foot-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 34px 20px 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}

footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--cyan); }
footer.site p { margin: 0; }

.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.foot-mark {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Legal pages keep the narrow column but get the same sticky bar. */
.wrap > footer.site { margin-top: 56px; padding-top: 24px; }

/* The landing has six nav items; below this width they no longer fit on one line,
   so the burger takes over. */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  header.site.collapsible nav {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 14px 16px;
    background: rgba(4, 6, 11, 0.97);
    border-bottom: 1px solid var(--line-2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
  }

  header.site.collapsible nav.is-open { display: flex; }
  header.site.collapsible nav a { padding: 13px 6px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
  header.site nav a::after { display: none; }
  header.site:not(.collapsible) nav { gap: 2px; }
  header.site:not(.collapsible) nav a { padding: 8px 8px; }
  .nav-cta { margin: 12px 0 2px; }
  .btn { width: 100%; }
  .btn.inline-w { width: auto; }
  th, td { padding: 10px 8px; }
  th { width: 46%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Print: the legal pages get read on paper by moderators often enough. */
@media print {
  body { background: #fff; color: #000; }
  body::before, body::after, .scanlines, .vignette, header.site { display: none; }
  .panel { border: 1px solid #ccc; background: #fff; }
  a { color: #000; }
}
