/* VELAR · «Крипта» (волна 33).
   Один тёмный холст: hero с matrix-дождём из ₿ и Ξ, живые котировки, четыре плитки,
   три тезиса, четыре шага. Палитра наследует лендинг V20 (--void/--bone/--amber):
   страница не заводит второй визуальный язык, а продолжает существующий.
   Анимация — только фон hero: непрозрачность слоя 0.3 (≤0.35 под текстом),
   частота кадров 30 (в диапазоне 30–60), без мерцания и без звука. */

.crypto-body {
  --void: #06070B;
  --base: #0B0D12;
  --surface: #12151C;
  --raised: #1A1E27;
  --bone: #F3EEE6;
  --text-2: #D6D2CB;
  --text-3: #ABA69E;
  --rule: #23262E;
  --rule-strong: #5E626B;
  --amber: #FFB240;
  --amber-ink: #1F1405;
  --gold: #FFD37A;
  --up: #2FD49A;
  --down: #FF5C5C;
  --focus: #FFD37A;
  --font-display: 'Science Gothic', 'Onest', sans-serif;
  --font-text: 'Onest', 'Noto Sans Georgian', 'Noto Sans Armenian', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font: 16px/1.65 var(--font-text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* { box-sizing: border-box; }

.crypto-body h1,
.crypto-body h2,
.crypto-body h3 {
  font-family: var(--font-display);
  font-weight: 540;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

.crypto-body p { margin: 0; }

.crypto-body a { color: var(--gold); text-underline-offset: .18em; overflow-wrap: anywhere; }
.crypto-body a:hover { color: var(--bone); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 15px;
  top: 15px;
  z-index: 200;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-240%);
}
.skip-link:focus { transform: translateY(0); }

/* ───────────────────────────── шапка ───────────────────────────── */
.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .02em;
  color: var(--bone);
  text-decoration: none;
}
.wordmark b { color: var(--amber); font-weight: 600; }
.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-inline-start: auto;
  font-size: 14px;
}
.topbar-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
  color: var(--bone);
  text-decoration: none;
}
.topbar-nav a:hover,
.topbar-nav a[aria-current="page"] { color: var(--amber); }
.page-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 9px;
  background: var(--base);
  font-size: 13px;
}
.page-lang > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.page-lang select {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--bone);
  font: inherit;
  min-height: 42px;
  padding: 0 16px 0 0;
  cursor: pointer;
}
.page-lang::after {
  content: "⌄";
  position: absolute;
  right: 9px;
  pointer-events: none;
  color: var(--text-3);
  font-size: 12px;
}

/* ───────────────────────────── страница ───────────────────────────── */
.crypto-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 72px;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  color: var(--text-3);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 10px; }
.breadcrumbs li + li::before { content: "/"; color: var(--rule-strong); }
.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-3);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--amber); }

/* ───────────────────────────── hero ───────────────────────────── */
.crypto-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 4px 0 0;
  padding: clamp(34px, 6vw, 84px) clamp(18px, 4vw, 56px) clamp(30px, 5vw, 60px);
  border: 1px solid var(--rule);
  border-radius: 22px;
  /* Статичный градиент — он же фолбэк: без JS и при reduced-motion canvas скрыт,
     а фон остаётся таким же тёмным и цельным. */
  background:
    radial-gradient(120% 90% at 12% -10%, rgba(255, 178, 64, .13), transparent 58%),
    radial-gradient(90% 80% at 92% 8%, rgba(47, 212, 154, .10), transparent 62%),
    linear-gradient(180deg, #090B11 0%, #06070B 62%, #05060A 100%);
}
.crypto-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 120% at 50% 0%, transparent 42%, rgba(6, 7, 11, .72) 100%);
}
.crypto-rain {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .3;               /* ≤ 0.35: дождь читается как фактура, а не как текст */
  pointer-events: none;
}
.crypto-rain canvas { display: block; width: 100%; height: 100%; }
.crypto-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
}
.crypto-eyebrow {
  color: var(--amber);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.crypto-hero h1 {
  font-size: clamp(31px, 5.6vw, 58px);
  margin-bottom: 18px;
  text-shadow: 0 2px 26px rgba(6, 7, 11, .86);
}
.crypto-lead {
  max-width: 62ch;
  color: var(--text-2);
  font-size: clamp(16px, 1.9vw, 18.5px);
  text-shadow: 0 1px 18px rgba(6, 7, 11, .8);
}

/* живые котировки */
.crypto-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px;
  margin: 30px 0 0;
  max-width: 640px;
}
.quote-card {
  position: relative;
  padding: 16px 18px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  background: rgba(11, 13, 18, .78);
  backdrop-filter: blur(2px);
}
.quote-mark {
  position: absolute;
  right: 14px;
  top: 8px;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: rgba(255, 178, 64, .32);
}
.quote-pair {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--text-3);
  text-transform: uppercase;
}
.quote-price {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 28px);
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}
.quote-change {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.quote-change.is-up { color: var(--up); }
.quote-change.is-down { color: var(--down); }
.quote-meta { font-size: 12px; color: var(--text-3); }
.quote-foot {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-3);
}
.quote-foot time { font-variant-numeric: tabular-nums; }
.quote-alert {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--base);
  color: var(--text-2);
  font-size: 13px;
}

.crypto-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--gold); color: var(--amber-ink); }
.btn-ghost { border-color: var(--rule-strong); color: var(--bone); background: transparent; }
.btn-ghost:hover { border-color: var(--bone); color: var(--bone); }

.crypto-hero-note {
  margin-top: 20px;
  max-width: 72ch;
  font-size: 13px;
  color: var(--text-3);
}

/* ───────────────────────────── секции ───────────────────────────── */
.crypto-section { margin-top: clamp(44px, 6vw, 78px); }
.crypto-head { max-width: 72ch; margin-bottom: 22px; }
.crypto-kicker {
  color: var(--amber);
  font-size: 12.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.crypto-section h2 { font-size: clamp(22px, 3.4vw, 34px); }

.crypto-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.tile {
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--surface);
}
.tile-stat {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--amber);
  margin-bottom: 10px;
}
.tile h3 { font-size: 19px; margin-bottom: 8px; }
.tile p { color: var(--text-2); font-size: 14.5px; }

.crypto-why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.why-card {
  padding: 22px 20px;
  border: 1px solid var(--rule);
  border-top: 2px solid rgba(255, 178, 64, .45);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 178, 64, .05), transparent 42%), var(--surface);
}
.why-stat {
  font-family: var(--font-mono);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  margin-bottom: 8px;
}
.why-card h3 { font-size: 18px; margin-bottom: 8px; }
.why-card p { color: var(--text-2); font-size: 14.5px; }
.crypto-note {
  margin-top: 16px;
  max-width: 78ch;
  font-size: 13.5px;
  color: var(--text-3);
}

.crypto-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--base);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 178, 64, .5);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 14.5px; }

/* ───────────────────────────── честная строка ───────────────────────────── */
.crypto-honest {
  margin-top: clamp(40px, 5vw, 64px);
  padding: 22px 24px;
  border: 1px solid #6A502C;
  border-inline-start: 3px solid var(--amber);
  border-radius: 14px;
  background: #17130E;
}
.crypto-honest-line {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.3vw, 21px);
  color: var(--bone);
}
.crypto-honest-mode {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-3);
}

/* ───────────────────────────── закрытие ───────────────────────────── */
.crypto-close {
  margin-top: clamp(40px, 5vw, 64px);
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--rule);
  border-radius: 20px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 178, 64, .10), transparent 60%),
    var(--surface);
}
.crypto-close h2 { font-size: clamp(22px, 3.2vw, 32px); margin-bottom: 10px; }
.crypto-close > p { max-width: 70ch; color: var(--text-2); }
.crypto-links { margin-top: 18px; font-size: 13.5px; color: var(--text-3); }

/* ───────────────────────────── фокус и движение ───────────────────────────── */
.crypto-body :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .topbar-nav { order: 3; width: 100%; margin-inline-start: 0; }
  .page-lang { margin-inline-start: auto; }
  .crypto-page { padding-inline: 16px; }
  .crypto-hero { border-radius: 18px; }
  .crypto-quotes { grid-template-columns: 1fr; }
}

@media (pointer: coarse) {
  .btn { min-height: 48px; }
  .crypto-quotes a,
  .crypto-links a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Фотосенситивный порог: ни одного мигания. При reduced-motion дождь не рисуется —
   остаётся статичный градиент hero, и ни один переход не запускается. */
@media (prefers-reduced-motion: reduce) {
  .crypto-rain { display: none; }
  .crypto-body *,
  .crypto-body *::before,
  .crypto-body *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
