/* AI NEROCHAT — общий дизайн-слой для статических страниц */

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --bg:              #04040f;
  --surface:         rgba(255,255,255,0.04);
  --border:          rgba(255,255,255,0.08);
  --accent-blue:     #3b82f6;
  --accent-violet:   #8b5cf6;
  --accent-cyan:     #06b6d4;
  --text-primary:    #f0f0ff;
  --text-muted:      rgba(200,200,230,0.55);
  --btn-max:         linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  --btn-tg:          linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);

  /* Spacing scale (rem — base 16px) */
  --sp-1:  0.25rem;   /* 4px  */
  --sp-2:  0.5rem;    /* 8px  */
  --sp-3:  0.75rem;   /* 12px */
  --sp-4:  1rem;      /* 16px */
  --sp-5:  1.25rem;   /* 20px */
  --sp-6:  1.5rem;    /* 24px */
  --sp-8:  2rem;      /* 32px */
  --sp-10: 2.5rem;    /* 40px */
  --sp-12: 3rem;      /* 48px */
  --sp-14: 3.5rem;    /* 56px */
  --sp-16: 4rem;      /* 64px */
  --sp-20: 5rem;      /* 80px */

  /* Border-radius */
  --r-sm:   0.375rem;  /* 6px   */
  --r-md:   0.625rem;  /* 10px  */
  --r-lg:   1rem;      /* 16px  */
  --r-xl:   1.25rem;   /* 20px  */
  --r-full: 6.25rem;   /* ~100px */
}

/* ============================================================
   BASE
   ============================================================ */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", sans-serif;
  min-height: 100vh;
  min-height: 100svh; /* iOS Safari fix */
  overflow-x: hidden;
  position: relative;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  z-index: 1;
  pointer-events: none;
  opacity: .4;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   I18N TEXT SWAP
   ============================================================ */
.swappable { transition: opacity .18s ease, transform .18s ease; display: inline; }
.swappable.out { opacity: 0; transform: translateY(5px); }

/* ============================================================
   LANGUAGE TOGGLE  — shared component
   ============================================================ */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-full);
  padding: 4px;
  gap: 2px;
  flex-shrink: 0;
}

.lang-pill {
  position: absolute;
  top: 4px;
  height: calc(100% - 8px);
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 0 18px rgba(99,102,241,0.55);
  transition: left 0.3s cubic-bezier(.16,1,.3,1), width 0.3s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
  z-index: 0;
}

.lang-btn {
  position: relative;
  z-index: 1;
  min-height: 2.25rem;         /* ≥36px touch target */
  padding: 0.4375rem 1rem;     /* 7px 16px */
  border-radius: var(--r-full);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.75rem;          /* 12px */
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
  line-height: 1;
}
.lang-btn.active { color: #fff; }
.lang-btn:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

/* ============================================================
   CTA BUTTONS  — mobile-first (stack full-width by default)
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;               /* 10px */
  padding: 1.125rem 1.75rem;   /* 18px 28px — mobile base */
  border-radius: var(--r-lg);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.0625rem;        /* 17px */
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
  text-decoration: none;
  transition: transform .18s cubic-bezier(.16,1,.3,1), box-shadow .2s ease;
  overflow: hidden;
  flex: 1 1 auto;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transition: left .4s ease;
  pointer-events: none;
}
.btn:hover::after { left: 150%; }
.btn:hover  { transform: scale(1.04) translateY(-2px); }
.btn:active { transform: scale(.98) translateY(0); }

.btn-max {
  background: var(--btn-max);
  box-shadow: 0 8px 32px rgba(99,102,241,.4), 0 0 0 1px rgba(139,92,246,.3), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-max:hover {
  box-shadow: 0 12px 48px rgba(99,102,241,.6), 0 0 60px rgba(99,102,241,.25), 0 0 0 1px rgba(139,92,246,.5), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-tg {
  background: var(--btn-tg);
  box-shadow: 0 8px 32px rgba(6,182,212,.35), 0 0 0 1px rgba(14,165,233,.3), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-tg:hover {
  box-shadow: 0 12px 48px rgba(6,182,212,.55), 0 0 60px rgba(6,182,212,.22), 0 0 0 1px rgba(14,165,233,.5), inset 0 1px 0 rgba(255,255,255,.15);
}

.btn-max::before,
.btn-tg::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 19px;
  filter: blur(12px);
  opacity: 0;
  z-index: -1;
  transition: opacity .25s;
}
.btn-max::before { background: var(--btn-max); }
.btn-tg::before  { background: var(--btn-tg); }
.btn:hover::before { opacity: .6; }

.btn-icon { font-size: 1.25rem; line-height: 1; flex-shrink: 0; }
.btn-text { display: flex; flex-direction: column; align-items: flex-start; }
.btn-name { font-size: 1.125rem; font-weight: 800; line-height: 1; }
.btn-sub  { font-size: 0.75rem; font-weight: 500; opacity: .75; letter-spacing: .04em; margin-top: 3px; }

/* ============================================================
   MICRO TEXT  (below CTA)
   ============================================================ */
.micro {
  font-size: 0.8125rem;        /* 13px */
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.micro-item { display: flex; align-items: center; gap: 5px; }
.micro-item::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  flex-shrink: 0;
}

/* ============================================================
   FOOTER LINKS
   ============================================================ */
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: rgba(150,150,180,.45);
  text-decoration: none;
  transition: color .2s ease;
  letter-spacing: .06em;
}
.footer-links a:hover { color: rgba(180,180,210,.75); }
.footer-sep { color: rgba(150,150,180,.2); }

/* ============================================================
   BUTTON RESPONSIVE SCALE
   ============================================================ */

/* 768px — row layout: auto width with cap */
@media (min-width: 48rem) {
  .btn {
    flex: 1 1 auto;
    max-width: 18.75rem;        /* 300px */
    padding: 1.25rem 2.25rem;   /* 20px 36px */
  }
}

/* 1440px — larger CTA */
@media (min-width: 90rem) {
  .btn {
    min-width: 16.25rem;        /* 260px */
    padding: 1.275rem 2rem;  /* 20px 32px */
  }
}

/* 1920px — Full HD */
@media (min-width: 120rem) {
  .btn {
    min-width: 18rem;
    padding: 1.5rem 3rem;
    font-size: 1.125rem;
  }
  .btn-name { font-size: 1.25rem; }
}
