@font-face {
  font-family: "Manrope";
  src: url("/assets/manrope-v20-cyrillic-ext-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0400-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/manrope-v20-latin-ext-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0000-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --green: #14332a;
  --green-600: #1e4a3b;
  --lime: #c2f86c;
  --lime-ink: #1b2a08;
  --green-ink: #dcefe6;
  --dark: #0e211b;
  --dark-deep: #07110d;
  --line: rgba(220, 239, 230, 0.14);
  --muted: rgba(220, 239, 230, 0.62);
  --r-sm: 8px;
  --r-pill: 999px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 13%, rgba(194, 248, 108, 0.09), transparent 28rem),
    radial-gradient(circle at 8% 88%, rgba(30, 74, 59, 0.38), transparent 34rem),
    linear-gradient(135deg, var(--dark-deep), var(--dark) 58%, #102a21);
  color: var(--green-ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(220, 239, 230, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 239, 230, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

body::after {
  inset: auto 7vw 10vh auto;
  width: min(34vw, 480px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.5;
  box-shadow: 0 0 0 54px rgba(220, 239, 230, 0.018), 0 0 0 108px rgba(220, 239, 230, 0.012);
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 36px clamp(24px, 6vw, 96px) 38px;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  letter-spacing: 0.1em;
}

.brand-mark { width: 26px; height: 28px; object-fit: contain; }
.brand-name { font-size: 16px; font-weight: 750; }
.brand-place {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  align-self: center;
  width: min(900px, 100%);
  padding: clamp(56px, 10vh, 112px) 0;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 22px 0 24px;
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 360;
  letter-spacing: -0.055em;
  line-height: 0.97;
  text-wrap: balance;
}

.error-page h1 { max-width: 760px; font-size: clamp(44px, 6vw, 88px); }

.lead {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 23px);
  line-height: 1.55;
  text-wrap: pretty;
}

.code-ghost {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: clamp(-20px, -2vw, 0px);
  transform: translateY(-52%);
  color: rgba(220, 239, 230, 0.052);
  font-size: clamp(190px, 31vw, 430px);
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 0.72;
  user-select: none;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 38px;
  padding: 10px 15px;
  border: 1px solid rgba(194, 248, 108, 0.26);
  border-radius: var(--r-pill);
  background: rgba(20, 51, 42, 0.42);
  color: var(--green-ink);
  font-size: 13px;
  backdrop-filter: blur(14px);
}

.status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 16px rgba(194, 248, 108, 0.55);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button-primary { background: var(--lime); color: var(--lime-ink); }
.button-primary:hover { background: #a8e84a; }
.button-secondary {
  border-color: var(--line);
  background: rgba(220, 239, 230, 0.055);
  color: var(--green-ink);
  backdrop-filter: blur(12px);
}
.button-secondary:hover { background: rgba(220, 239, 230, 0.1); }
a:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
footer a { color: var(--green-ink); text-underline-offset: 4px; }

@media (max-width: 640px) {
  body::after { right: -32vw; bottom: 18vh; width: 90vw; }
  .page { padding: 24px 20px 26px; }
  .brand-place { margin-left: auto; }
  .hero { padding: 64px 0 52px; }
  h1, .error-page h1 { margin-top: 18px; font-size: clamp(42px, 13vw, 64px); line-height: 1; }
  .lead { font-size: 17px; }
  .code-ghost { top: 42%; right: -12vw; font-size: 52vw; }
  .actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .status span { animation: status-pulse 2.6s ease-in-out infinite; }
  .button:hover { transform: translateY(-1px); }
  @keyframes status-pulse { 50% { opacity: 0.45; box-shadow: 0 0 5px rgba(194, 248, 108, 0.3); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  body::before, body::after, .code-ghost { display: none; }
  .button { border: 1px solid ButtonText; }
}
