/* ============================================================
   ЭЛЕКТРОН1К — дизайн-система
   Тёмная технологичная тема, электрик-синий акцент
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;500;600;700;800&family=Onest:wght@400;500;600;700&display=swap');

:root {
  /* Поверхности — угольный нейтральный тон (как фон логотипа) */
  --bg:        #161618;
  --bg-grad-a: #1C1C20;
  --bg-grad-b: #121214;
  --panel:     #1E1E22;
  --panel-2:   #242429;
  --raised:    #2B2B31;
  --line:      rgba(180, 178, 190, 0.12);
  --line-2:    rgba(180, 178, 190, 0.22);

  /* Текст — тёплый белый */
  --text:      #F3F2F0;
  --text-2:    #C4C3C9;
  --muted:     #8C8B94;
  --faint:     #56618200;

  /* Акценты — фирменный коралл */
  --accent:      #E56159;      /* коралл из логотипа */
  --accent-bright:#ED7A72;
  --accent-2:    #F2A98F;      /* тёплый персик */
  --accent-glow: rgba(229, 97, 89, 0.45);
  --accent-2-glow: rgba(242, 169, 140, 0.35);

  /* Семантика */
  --ok:        #2BE08A;
  --warn:      #FFC53D;

  /* Радиусы */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 30px;

  /* Тени / свечения */
  --shadow:    0 24px 60px -24px rgba(0,0,0,0.7);
  --shadow-sm: 0 8px 24px -12px rgba(0,0,0,0.6);
  --ring:      0 0 0 1px var(--line);

  /* Типографика */
  --display: 'Unbounded', system-ui, sans-serif;
  --body:    'Onest', system-ui, sans-serif;

  --maxw: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; scrollbar-color: var(--accent) #121214; scrollbar-width: thin; }

/* фирменный скролл-бар */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #121214; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  border-radius: 999px; border: 2px solid #121214;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-bright); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: #151517;
  background-attachment: fixed;
  min-height: 100vh;
}

/* ===== реактивный фон: ореол + зерно + частицы ===== */
.aura { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; --p: 0; }
.aura__glow {
  position: absolute; inset: 0; display: block;
  /* положение ореола смещается от правого-верха к центру по мере скролла (--p) */
  background:
    radial-gradient(
      760px 460px at calc(86% - var(--p) * 30%) calc(-12% + var(--p) * 46%),
      rgba(229, 97, 89, calc(0.10 + var(--p) * 0.06)),
      transparent 60%
    );
  transition: background .25s linear;
  will-change: background;
}
.aura__grain {
  position: absolute; inset: 0; display: block; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.aura__dots { position: absolute; inset: 0; display: block; }
.aura__dots i {
  position: absolute; left: calc((var(--i) * 73 % 100) * 1%);
  bottom: -20px; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(242, 169, 140, 0.5); box-shadow: 0 0 8px rgba(242,169,140,.4);
  animation: floatUp calc(16s + (var(--i) * 1.7s)) linear infinite;
  animation-delay: calc(var(--i) * -2.3s); opacity: 0;
}
@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: .7; }
  90%  { opacity: .5; }
  100% { transform: translateY(-104vh) translateX(calc((var(--i) % 5 - 2) * 30px)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .aura__glow { transition: none; }
  .aura__dots { display: none; }
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Тонкая «схемная» сетка-подложка */
.app > .circuit-bg { display: none; }
.circuit-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
}

/* ============================== Layout ============================== */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.app  { position: relative; z-index: 1; }

.section { padding: 92px 0; }
.section--tight { padding: 56px 0; }

/* ============================== Header ============================== */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(8, 11, 20, 0.66);
  border-bottom: 1px solid var(--line);
}
.header__row {
  display: flex; align-items: center; gap: 24px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.brand__logo { height: 30px; width: auto; display: block; }
.footer .brand__logo { height: 40px; }
.brand__mark-img {
  width: 40px; height: 40px; display: block; flex: none;
  filter: drop-shadow(0 6px 16px var(--accent-glow));
}
.brand__word {
  font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
  line-height: 1; color: var(--text);
}
.brand__word .one {
  color: var(--accent);
  position: relative;
}
.brand__sub { font-size: 11px; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; margin-top: 3px; }

.nav { display: flex; gap: 4px; margin-left: 14px; }
.nav__item {
  position: relative;
  padding: 9px 16px; border-radius: 999px;
  color: var(--text-2); font-weight: 500; font-size: 14.5px;
  background: transparent; border: 1px solid transparent;
  transition: color .18s, background .18s, border-color .18s;
  white-space: nowrap;
}
.nav__item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav__item.is-active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(229,97,89,0.22), rgba(229,97,89,0.10));
  border-color: rgba(237,122,114,0.45);
  box-shadow: 0 0 0 1px rgba(237,122,114,0.10), 0 8px 20px -12px var(--accent-glow);
}
.header__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.lang {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(255,255,255,0.02);
}
.lang button {
  border: none; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  letter-spacing: 0.04em; transition: .15s;
}
.lang button.is-active { background: var(--accent); color: #fff; }

/* ============================== Buttons ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  padding: 14px 22px; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #fff;
  box-shadow: 0 10px 28px -10px var(--accent-glow), 0 0 0 1px rgba(255,255,255,0.12) inset;
  position: relative; overflow: hidden;
}
.btn--primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-18deg); pointer-events: none;
  animation: sheen 5.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 70% { left: -60%; } 88%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .btn--primary::after { display: none; } }
.btn--primary:hover { box-shadow: 0 14px 34px -8px var(--accent-glow), 0 0 0 1px rgba(255,255,255,0.18) inset; }
.btn--ghost {
  background: rgba(255,255,255,0.03); color: var(--text); border-color: var(--line-2);
}
.btn--ghost:hover { background: rgba(255,255,255,0.07); border-color: var(--line-2); }
.btn--wa { background: #25D366; color: #06310F; box-shadow: 0 10px 26px -12px rgba(37,211,102,0.6); }
.btn--tg { background: #29A9EB; color: #04263b; box-shadow: 0 10px 26px -12px rgba(41,169,235,0.6); }
.btn--wa:hover, .btn--tg:hover { filter: brightness(1.06); }
.btn--sm { padding: 10px 16px; font-size: 13.5px; }
.btn--lg { padding: 17px 28px; font-size: 16px; }
.btn--block { width: 100%; }

/* ============================== Pills / tags ============================== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2); padding: 7px 14px; border-radius: 999px;
  background: rgba(242,169,140,0.08); border: 1px solid rgba(242,169,140,0.22);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); animation: dotPulse 2.6s ease-in-out infinite; }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
}
.tag svg { width: 14px; height: 14px; color: var(--accent-bright); }

/* ============================== Typography ============================== */
.h1 { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 5.4vw, 62px); line-height: 1.02; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.h2 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.06; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.h3 { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
.lead { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--text-2); margin: 0; text-wrap: pretty; }
.body { font-size: 15.5px; line-height: 1.6; color: var(--text-2); margin: 0; text-wrap: pretty; }
.grad-text { background: linear-gradient(100deg, #fff 10%, var(--accent-bright) 55%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============================== Cards ============================== */
.card {
  background: linear-gradient(180deg, var(--panel), rgba(20,20,24,0.6));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: 26px; }

.glow-edge { position: relative; }
.glow-edge::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(237,122,114,0.5), transparent 40%, transparent 70%, rgba(242,169,140,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: .8;
}

/* ============================== Fade in ============================== */
/* Анимации двигают ТОЛЬКО transform — никогда не opacity,
   чтобы фоновый/троттленый iframe не прятал контент на нулевом кадре */
.fade-up { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1); }
@keyframes fadeUp { from { transform: translateY(14px); } to { transform: none; } }
.tab-enter { animation: tabIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes tabIn { from { transform: translateY(10px); } to { transform: none; } }

/* появление при скролле — на переходах (надёжно отрабатывает) */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ambient: мерцание градиентного текста */
.grad-text { background-size: 220% auto; animation: gradPan 7s ease-in-out infinite alternate; }
@keyframes gradPan { from { background-position: 0% center; } to { background-position: 100% center; } }

/* ambient: медленный дрейф схемной сетки */
.circuit-bg { animation: gridDrift 50s linear infinite; }
@keyframes gridDrift { from { background-position: 0 0, 0 0; } to { background-position: 64px 64px, 64px 64px; } }

/* ambient: пульс акцентной точки */
@keyframes dotPulse { 0%, 100% { box-shadow: 0 0 7px var(--accent-2); opacity: .85; } 50% { box-shadow: 0 0 16px var(--accent-2); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .grad-text, .circuit-bg, .eyebrow .dot { animation: none !important; }
}

/* utility */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-48{margin-top:48px}
.center { text-align: center; }
.muted { color: var(--muted); }

/* Responsive */
@media (max-width: 920px) {
  .nav { display: none; }
  .section { padding: 64px 0; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .header__right .btn--cta-text { display: none; }
}
