/* 404 — Рядомо (самодостаточно для global-not-found) */
:root {
  --nf-bg: #0b0c0e;
  --nf-card-2: #1d1e20;
  --nf-border: #3a3c40;
  --nf-yellow: #ffc400;
  --nf-yellow-hover: #ffd238;
  --nf-yellow-active: #e6ad00;
  --nf-text: #ffffff;
  --nf-muted: #a8a8a8;
  --nf-dim: #767a80;
  --nf-on-yellow: #101010;
  --nf-font: "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
}

.nf-shell {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--nf-text);
  background:
    radial-gradient(520px 740px at 16% 18%, rgba(255, 255, 255, 0.04), transparent 54%),
    radial-gradient(520px 820px at 88% 2%, rgba(255, 196, 0, 0.035), transparent 46%),
    var(--nf-bg);
  font-family: var(--nf-font);
  font-stretch: condensed;
}

body.nf-shell {
  overflow-x: hidden;
}

.nf-shell *,
.nf-page * {
  box-sizing: border-box;
}

.nf-brand {
  display: inline-grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: inherit;
  text-decoration: none;
}

.nf-brand__logo {
  width: 56px;
  height: 56px;
  color: var(--nf-yellow);
  filter: drop-shadow(0 0 12px rgba(255, 196, 0, 0.12));
}

.nf-brand__copy {
  display: grid;
  gap: 4px;
  text-align: left;
}

.nf-brand__name {
  font-size: 28px;
  font-weight: 900;
  line-height: 0.92;
}

.nf-brand__tag {
  color: #c8c8c8;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.16;
}

.nf-page {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 0;
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
  text-align: center;
}

.nf-page::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 8%;
  left: 50%;
  width: min(420px, 92vw);
  height: min(420px, 92vw);
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 0, 0.12) 0%, transparent 68%);
  pointer-events: none;
  animation: nf-glow 5.5s ease-in-out infinite;
}

.nf-code {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.04em;
  margin: 0;
  font-size: clamp(96px, 28vw, 148px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.22);
  user-select: none;
}

.nf-code span {
  display: inline-block;
  animation: nf-digit 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nf-code span:nth-child(2) {
  color: var(--nf-yellow);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 28px rgba(255, 196, 0, 0.35);
  animation-delay: 80ms;
}

.nf-code span:nth-child(3) {
  animation-delay: 160ms;
}

.nf-kicker {
  margin: 18px 0 0;
  color: var(--nf-yellow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nf-page h1 {
  margin: 10px 0 0;
  max-width: 18ch;
  font-size: clamp(28px, 6.5vw, 38px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.nf-lead {
  margin: 12px 0 0;
  max-width: 36ch;
  color: var(--nf-muted);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

.nf-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  margin-top: 28px;
}

.nf-btn {
  display: inline-grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--nf-border);
  background: linear-gradient(145deg, var(--nf-card-2) 0%, #111214 100%);
  color: var(--nf-text);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.nf-btn svg {
  width: 22px;
  height: 22px;
  color: var(--nf-yellow);
}

.nf-btn--primary {
  border-color: transparent;
  background: var(--nf-yellow);
  color: var(--nf-on-yellow);
}

.nf-btn--primary svg {
  color: var(--nf-on-yellow);
}

.nf-btn:focus-visible {
  outline: 2px solid var(--nf-yellow);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .nf-btn:hover {
    border-color: var(--nf-yellow);
  }

  .nf-btn--primary:hover {
    border-color: transparent;
    background: var(--nf-yellow-hover);
  }
}

.nf-btn:active {
  transform: scale(0.98);
}

.nf-btn--primary:active {
  background: var(--nf-yellow-active);
}

.nf-hint {
  margin: 22px 0 0;
  color: var(--nf-dim);
  font-size: 14px;
  line-height: 1.3;
}

.nf-hint a {
  color: var(--nf-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes nf-digit {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes nf-glow {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@media (min-width: 720px) {
  .nf-page {
    padding: 64px 0 96px;
  }

  .nf-actions {
    max-width: 400px;
  }

  .nf-btn {
    min-height: 56px;
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nf-page::before,
  .nf-code span {
    animation: none;
  }
}
