/* ============================================================
   BASE — токены дизайн-системы, сброс, типографика, анимации
   ============================================================ */

:root {
  /* --- Поверхности --- */
  --bg: #05060f;
  --bg-soft: #0a0c1a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* --- Текст --- */
  --text: #f4f5ff;
  --text-muted: rgba(233, 236, 255, 0.66);
  --text-dim: rgba(233, 236, 255, 0.42);

  /* --- Бренд --- */
  --brand-1: #6366f1;
  --brand-2: #a855f7;
  --brand-3: #f472b6;
  --brand-4: #22d3ee;
  --brand-play: #22c55e;

  --grad-brand: linear-gradient(135deg, var(--brand-1), var(--brand-2) 45%, var(--brand-3));
  --grad-deep: linear-gradient(135deg, var(--brand-1), #7c3aed);
  --grad-cool: linear-gradient(135deg, var(--brand-4), var(--brand-1));

  /* --- Радиусы --- */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-full: 999px;

  /* --- Тени --- */
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 40px 90px rgba(0, 0, 0, 0.6);
  --glow: 0 0 60px rgba(99, 102, 241, 0.35);

  /* --- Ритм --- */
  --section-y: clamp(72px, 10vw, 140px);
  --gutter: clamp(20px, 4vw, 40px);
  --maxw: 1180px;

  /* --- Движение --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans Armenian', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul { list-style: none; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: rgba(168, 85, 247, 0.4); color: #fff; }

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

/* --- Полоса прокрутки --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--r-full);
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ============================================================
   ТИПОГРАФИКА
   ============================================================ */

h1, h2, h3, h4 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display {
  font-size: clamp(42px, 7.5vw, 82px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.section-title {
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-lead {
  color: var(--text-muted);
  font-size: clamp(15px, 1.9vw, 18px);
  max-width: 58ch;
}

.text-grad {
  background: var(--grad-brand);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: hueSlide 8s ease-in-out infinite;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-2));
}

/* ============================================================
   УТИЛИТЫ
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}

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

/* ============================================================
   АНИМАЦИИ
   ============================================================ */

@keyframes hueSlide {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(4%, -6%, 0) scale(1.08); }
  66% { transform: translate3d(-5%, 4%, 0) scale(0.95); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 12px)); }
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.55; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(220%); }
}

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

@keyframes flipIn {
  from { opacity: 0; transform: translateY(-40%); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Появление при прокрутке --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.85s var(--ease-out) var(--reveal-delay, 0s),
    transform 0.85s var(--ease-out) var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   ДОСТУПНОСТЬ — уважаем отключённую анимацию
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}
