/* ============================================================
   /hud-update/ — хиро по мотивам интро rahul.design/about:
   вордмарк с goo-порогом, 3D-кольцо текста вокруг знака,
   воксельный пиксельный астериск (WebGL, hud-update/hero.js)
   и жест «потяни вверх, чтобы войти».
   Палитра — css/kit-tokens.css; красный вордмарка и голубой
   блик — собственные цвета интро, как у оригинала.
   ============================================================ */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/geist-cyrillic-wght.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/geist-latin-wght.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}

.rd-hero {
  --rd-name: #a01c14;
  --rd-lit: #dceaff;
  --rd-ground: var(--background);
  --rd-ink: var(--fg-4);
  --mark: 260px;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  /* nav — sticky и занимает 84px в потоке: хиро уходит под него */
  margin-top: -84px;
  overflow: hidden;
  isolation: isolate;
  background: var(--rd-ground);
  color: var(--rd-ink);
  user-select: none;
  -webkit-user-select: none;
}
html[data-theme="dark"] .rd-hero { --rd-ground: #000; }

.rd-goo-defs { position: absolute; width: 0; height: 0; }

/* ---------- вордмарк ---------- */
.rd-name {
  position: absolute; inset: 0;
  z-index: 0;
  display: grid; place-items: center;
  pointer-events: none;
}
.rd-name__slot {
  --fs: 200px;
  --goo: 0.018em;
  --flash: 0.168;
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 640;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 0;
  font-size: var(--fs);
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--rd-name);
  filter: blur(var(--goo)) url(#rd-goo-fine);
}
.rd-name__line { display: block; white-space: nowrap; }
.rd-name__line > span {
  display: inline-block;
  white-space: pre;
  color: color-mix(in srgb, var(--rd-lit) calc(var(--flash) * var(--lf, 1) * 100%), var(--rd-name));
}
.rd-name__line > span.is-in  { animation: rd-melt-in  .62s ease-in-out both; }
.rd-name__line > span.is-out { animation: rd-melt-out .62s ease-in-out both; }
@keyframes rd-melt-in {
  0%   { filter: blur(4.5px); opacity: 0; }
  40%  { filter: blur(3.2px); opacity: .65; }
  100% { filter: blur(0);     opacity: 1; }
}
@keyframes rd-melt-out {
  0%   { filter: blur(0);     opacity: 1; }
  60%  { filter: blur(3.2px); opacity: .55; }
  100% { filter: blur(4.5px); opacity: 0; }
}

/* ---------- знак (канвас на весь хиро: осколкам есть куда лететь) ---------- */
.rd-mark {
  position: absolute; inset: 0;
  z-index: 1;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
  /* канвас в 1/3 разрешения — пиксели растягиваются без сглаживания */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.rd-mark-fallback {
  position: absolute; top: 50%; left: 50%;
  z-index: 1;
  width: calc(var(--mark) * .8); height: calc(var(--mark) * .8);
  transform: translate(-50%, -50%);
  color: var(--rd-ink);
  pointer-events: none;
}

/* ---------- 3D-кольцо текста ---------- */
.rd-ring {
  --r: 220px;
  position: absolute; top: 50%; left: 50%;
  z-index: 2;
  width: 0; height: 0;
  perspective: 1400px;
  pointer-events: none;
  font-family: 'Geist', 'Open Runde', system-ui, sans-serif;
  font-size: clamp(22px, 3.2vw, 45px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--rd-ink);
}
.rd-ring__tilt { position: absolute; transform-style: preserve-3d; transform: rotateX(7.7deg) rotateZ(2.5deg); }
.rd-ring__spin { position: absolute; transform-style: preserve-3d; }
.rd-ring__spin > span {
  position: absolute; left: 0; top: 0;
  white-space: pre;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate(-50%, -50%) rotateY(calc(var(--a) * 1rad)) translateZ(var(--r));
  transition: opacity .28s ease-out;
}
.rd-ring__spin > span.is-off { opacity: 0; }

/* ---------- зона захвата ---------- */
.rd-grab {
  position: absolute; top: 50%; left: 50%;
  z-index: 3;
  width: calc(var(--mark) * 2.4); height: calc(var(--mark) * 2.4);
  max-width: 96vw; max-height: 70svh;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  touch-action: none;
  cursor: grab;
}
.rd-hero.is-dragging .rd-grab { cursor: grabbing; }
.rd-hero.is-busy .rd-grab { cursor: default; }

/* ---------- подсказка: линия, бусина, подпись ---------- */
.rd-hint {
  --pull: 180px;
  --c: 0;
  position: absolute; left: 50%; bottom: 40px;
  z-index: 4;
  width: 220px;
  height: calc(var(--pull) + 30px);
  margin-left: -110px;
  padding: 0; border: 0; background: none;
  color: var(--rd-ink);
  font: inherit;
  cursor: grab;
  touch-action: none;
  opacity: 0;
  transition: opacity .2s ease-out;
}
.rd-hero.is-armed .rd-hint { opacity: 1; }
.rd-hint:focus-visible { outline: none; }
.rd-hint:focus-visible .rd-hint__label { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.rd-hint__track,
.rd-hint__fill {
  position: absolute; left: 50%; top: 0;
  width: 1px; height: var(--pull);
  margin-left: -.5px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: 50% 100%;
}
.rd-hint__track { opacity: .16; transform: scaleY(var(--track, .2778)); transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.rd-hint__fill  { transform: scaleY(var(--c)); }
.rd-hint__bead {
  position: absolute; left: 50%; top: 0;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 9999px;
  background: currentColor;
  display: grid; place-items: center;
  transform: translateY(calc(var(--pull) * (1 - var(--c))));
  opacity: var(--bead, 0);
  transition: opacity .2s ease-out;
}
.rd-hint__bead svg { width: 12px; height: 12px; color: var(--rd-ground); display: block; }
.rd-hint__label {
  position: absolute; left: 50%; top: calc(var(--pull) + 18px);
  transform: translateX(-50%);
  font-family: 'Geist', 'Open Runde', system-ui, sans-serif;
  font-size: 12px; font-weight: 500; line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
  opacity: .55;
  transition: opacity .2s ease-out;
}
.rd-hint:hover .rd-hint__label { opacity: .8; }

/* ---------- тело страницы (пока пустое) ---------- */
.rd-body { width: 100%; padding: 80px 0 40px; min-height: 40vh; }

/* ---------- блок-ролик: 1:1 с .menu-reel из /release-update/ (css/update.css на main) ---------- */
.menu-reel { width: 100%; max-width: 576px; margin: 40px auto 0; padding: 0 20px; }
.menu-reel__head { margin: 0; }
.menu-reel__eyebrow { margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--fg-2); }
.menu-reel__title { margin: 4px 0 0; font-size: 20px; line-height: 28px; font-weight: 500; color: var(--fg-4); }
.menu-reel__lead { margin: 16px 0 0; font-size: 16px; line-height: 1.375; font-weight: 400; color: var(--fg-3); }
.menu-reel__lead strong { font-weight: 500; color: var(--fg-4); }
.menu-reel__frame {
  position: relative;
  width: 100%; margin: 20px 0 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--bg-4);
  border-radius: 12px; overflow: hidden;
  background: #000;
}
/* светлый ролик (пастельный HUD петов): до первого кадра не мигаем чёрным */
.menu-reel__frame--light { background: var(--bg-2); }
@media (min-width: 768px) {
  .menu-reel__frame { width: 768px; left: 50%; transform: translateX(-50%); }
}
.menu-reel__frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.menu-reel + .menu-reel { margin-top: 40px; }

@media (max-width: 767px) {
  .rd-hero { --mark: 190px; }
  .rd-hint { bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .rd-name__line > span.is-in,
  .rd-name__line > span.is-out { animation: none; }
  .rd-hint__track, .rd-ring__spin > span { transition: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
