/* FurFoxAI — base layer: fonts, palette, primitives. */

@font-face {
  font-family: 'Press Start 2P';
  src: url('/assets/fonts/press-start-2p-cyrillic.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Press Start 2P';
  src: url('/assets/fonts/press-start-2p-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/assets/fonts/pixelify-sans-cyrillic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/assets/fonts/pixelify-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #08030f;
  --bg-2: #0d0617;
  --bg-3: #12081f;
  --panel: #140a22;
  --panel-2: #1b0e2d;
  --panel-3: #241140;
  --line: #331a50;
  --line-2: #5c2f8f;
  --line-3: #7b46b8;
  --violet: #a855f7;
  --violet-soft: #c084fc;
  --violet-deep: #6d28d9;
  --lav: #e2ccff;
  --pink: #ff5fa2;
  --pink-soft: #ff9ecb;
  --mint: #5eead4;
  --amber: #fbbf24;
  --text: #f3ebff;
  --muted: #b7a3d6;
  --dim: #7d6798;
  --danger: #ff6b81;
  --ok: #6ee7a8;
  --shadow: #04010a;
  --font-pixel: 'Press Start 2P', 'Courier New', monospace;
  --font-ui: 'Pixelify Sans', 'Trebuchet MS', sans-serif;
  --pixel: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 75%, rgba(255, 95, 162, 0.09), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(4, 1, 10, 0.16) 0,
    rgba(4, 1, 10, 0.16) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.5;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--lav);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--pink-soft);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

code,
pre,
kbd {
  font-family: 'Consolas', 'Courier New', monospace;
}

::selection {
  background: var(--violet);
  color: #14061f;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
::-webkit-scrollbar-track {
  background: #0a0412;
  border-left: 2px solid var(--line);
}
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border: 2px solid #0a0412;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--line-3);
}

.wrap {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet-soft);
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--line-2);
}

.pixel-title,
.display {
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--shadow);
}

.serif-accent,
.accent-text {
  color: var(--violet-soft);
}

.hl-pink {
  color: var(--pink-soft);
}

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

.mono {
  font-family: 'Consolas', 'Courier New', monospace;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--violet);
  color: #14061f;
  font-weight: 700;
  text-decoration: none;
  border: 3px solid var(--lav);
}

.skip-link:focus {
  top: 12px;
}

.noscript {
  padding: 14px 20px;
  background: #3a1024;
  border-bottom: 3px solid var(--danger);
  color: #ffe1e8;
  text-align: center;
  font-weight: 600;
}

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--panel-2);
  --btn-fg: var(--text);
  --btn-line: var(--line-2);
  --btn-shadow: #2a0d49;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 3px solid var(--btn-line);
  border-radius: 0;
  box-shadow: 5px 5px 0 var(--btn-shadow);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s linear, border-color 0.12s linear,
    transform 0.06s steps(1), box-shadow 0.06s steps(1), color 0.12s linear;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn:hover {
  background: var(--panel-3);
  border-color: var(--line-3);
  color: #fff;
}

.btn:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--btn-shadow);
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 3px 3px 0 var(--btn-shadow);
}

.btn--primary,
.btn--dark {
  --btn-bg: var(--violet);
  --btn-fg: #160726;
  --btn-line: #e2ccff;
  --btn-shadow: #3f1170;
}

.btn--primary:hover,
.btn--dark:hover {
  --btn-bg: #c084fc;
  --btn-fg: #12051f;
  --btn-line: #f3e8ff;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--lav);
  --btn-line: var(--line-2);
  --btn-shadow: rgba(4, 1, 10, 0.7);
}

.btn--ghost:hover {
  --btn-bg: rgba(168, 85, 247, 0.12);
  --btn-fg: #fff;
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-line: var(--line-3);
}

.btn--outline:hover {
  --btn-bg: rgba(168, 85, 247, 0.14);
}

.btn--danger {
  --btn-bg: #2a0d1c;
  --btn-fg: #ffc2ce;
  --btn-line: #7a2741;
  --btn-shadow: #190510;
}

.btn--small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 15px;
  box-shadow: 4px 4px 0 var(--btn-shadow);
}

.btn--small:active {
  transform: translate(4px, 4px);
}

.btn--block {
  width: 100%;
}

.btn--icon {
  min-width: 40px;
  min-height: 40px;
  padding: 8px;
  box-shadow: 3px 3px 0 var(--btn-shadow);
}

.btn.is-copied {
  --btn-bg: #173a2c;
  --btn-fg: var(--ok);
  --btn-line: #2f7d5c;
}

/* ---------- panels ---------- */

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(36, 17, 64, 0.55), rgba(16, 8, 28, 0.92));
  border: 3px solid var(--line);
  box-shadow: 8px 8px 0 rgba(4, 1, 10, 0.75);
}

.panel::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 10px;
  height: 10px;
  background: var(--line-2);
  box-shadow: 0 0 0 2px var(--bg);
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 2px solid var(--line-2);
  background: rgba(10, 4, 18, 0.7);
  color: var(--lav);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
}

.chip i {
  width: 8px;
  height: 8px;
  background: var(--ok);
  box-shadow: 0 0 0 2px rgba(110, 231, 168, 0.2);
  animation: blink 1.6s steps(1) infinite;
}

.chip--pink {
  border-color: #a33d68;
  color: var(--pink-soft);
}

@keyframes blink {
  0%,
  55% {
    opacity: 1;
  }
  56%,
  100% {
    opacity: 0.25;
  }
}

/* ---------- forms ---------- */

.form-label {
  display: block;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.form-input,
input[type='text'],
input[type='password'],
input[type='email'],
input[type='number'],
select,
textarea {
  width: 100%;
  padding: 13px 15px;
  background: #0a0413;
  color: var(--text);
  border: 3px solid var(--line);
  border-radius: 0;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.45);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.4;
  appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: #5f4b78;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(168, 85, 247, 0.22);
}

.form-error {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--pink-soft);
  font-size: 16px;
  font-weight: 600;
}

.form-hint {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.45;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 3px solid var(--violet-soft);
  border-bottom: 3px solid var(--violet-soft);
  transform: rotate(45deg);
  pointer-events: none;
}

.select-wrap select {
  padding-right: 44px;
}

.select-wrap--block {
  display: block;
  width: 100%;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 300;
  max-width: min(520px, calc(100% - 32px));
  padding: 14px 20px;
  background: #170b28;
  color: var(--lav);
  border: 3px solid var(--line-2);
  box-shadow: 6px 6px 0 var(--shadow);
  font-weight: 600;
  text-align: center;
  transform: translate(-50%, 30px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.14s steps(2), opacity 0.14s linear;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast.is-error {
  border-color: var(--danger);
  color: #ffd3db;
}

.copy-fallback {
  position: fixed;
  left: -9999px;
  top: 0;
}

/* ---------- utility ---------- */

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

::placeholder {
  letter-spacing: 0.02em;
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }
  .wrap {
    width: min(1200px, calc(100% - 28px));
  }
  .btn {
    min-height: 46px;
    padding: 11px 16px;
    font-size: 16px;
  }
}
