/* Fid: дизайн-токены и база. Тема одна: тёмно-синяя (по утверждённому лого). */
@import url('../fonts/fonts.css');

:root {
  /* Поверхности */
  --bg0: #04070f;
  --bg1: #071126;
  --bg2: #0b1b3a;
  --bg-card: #081430;
  --line: rgba(148, 178, 235, 0.14);
  --line-strong: rgba(148, 178, 235, 0.26);

  /* Текст */
  --ink: #eef3ff;
  --ink2: #a9b9d9;
  --ink3: #7286ac;

  /* Акцент: сине-голубой градиент бренда Fid */
  --acc: #4d9fff;
  --acc-deep: #2e63f0;
  --acc-ink: #041022;
  --grad: linear-gradient(98deg, #6db8ff 0%, #3f7bff 52%, #2e5ae8 100%);
  /* Для заливок под белым текстом: оба конца держат контраст 4,5:1+ */
  --grad-btn: linear-gradient(98deg, #2f66f5 0%, #2447d6 100%);
  --grad-soft: linear-gradient(98deg, rgba(109, 184, 255, 0.16), rgba(46, 90, 232, 0.16));

  /* Семантика */
  --flame: #ff8a3c;
  --good: #3ddc97;
  --bad: #ff6b6b;

  /* Тональные акценты для иконок и подложек: разнообразие без слома бренда */
  --tone-blue: #4d9fff;
  --tone-green: #3ddc97;
  --tone-amber: #ffc94d;
  --tone-violet: #a794ff;
  --tone-cyan: #4dd8e6;
  --tone-rose: #ff8aa8;

  /* Геометрия: поверхности 20px, инпуты 12px, интерактив pill */
  --r-card: 20px;
  --r-input: 12px;
  --r-pill: 999px;

  --container: 1200px;
  --nav-h: 68px;

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow-card: 0 24px 60px -28px rgba(2, 8, 26, 0.9);

  color-scheme: dark;
}

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

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg0);
  color: var(--ink);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

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

h1, h2, h3, h4 { margin: 0; line-height: 1.15; }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: 0; padding: 0; }

.container {
  width: min(var(--container), 100% - 40px);
  margin-inline: auto;
}

.display {
  font-family: 'Unbounded', 'Onest', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Иконки (Phosphor, viewBox 256) */
.ic {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}

/* Кнопки: интерактив = pill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--r-pill);
  padding: 16px 28px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 160ms var(--ease), box-shadow 200ms var(--ease),
    background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 12px 32px -12px rgba(63, 123, 255, 0.55);
}

.btn-primary:hover { box-shadow: 0 16px 40px -12px rgba(63, 123, 255, 0.7); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(148, 178, 235, 0.04);
}

.btn-ghost:hover { border-color: var(--acc); background: rgba(77, 159, 255, 0.08); }

.btn-sm { padding: 11px 20px; font-size: 15px; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(63, 123, 255, 0.4); }

/* Появление при скролле: прячем только при работающем JS */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
