/* =========================================================
   КОЛЬОРИ ТА ШРИФТИ
   ========================================================= */
:root {
  --color-bg: #0b0d17;        /* фон — глибокий темно-синій */
  --color-bg-alt: #11142a;    /* фон секцій, що чергуються */
  --color-card: #161a33;      /* картки */
  --color-text: #eef0ff;
  --color-muted: #9aa0c3;
  --color-a: #7c5cff;         /* градієнт: фіолетовий */
  --color-b: #22d3ee;         /* градієнт: бірюзовий */
  --gradient: linear-gradient(120deg, var(--color-a), var(--color-b));
  --font-title: 'Unbounded', Arial, sans-serif;
  --font-text: 'Inter', Arial, sans-serif;
  --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-text); background: var(--color-bg); color: var(--color-text); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.container { width: min(1140px, 92%); margin: 0 auto; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block; text-align: center; padding: 15px 30px; border-radius: 999px;
  background: var(--gradient); color: #fff; font-weight: 600; border: none; cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(124,92,255,.4); }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 2px rgba(255,255,255,.2); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--color-b); }
.btn--small { padding: 9px 20px; font-size: .9rem; }

/* ---------- Шапка ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 100; padding: 18px 0; transition: background .3s, padding .3s; }
.header.scrolled { background: rgba(11,13,23,.95); padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.header__inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-title); font-weight: 800; font-size: 1.4rem; }
.logo span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--color-muted); transition: color .2s; }
.nav a:not(.btn):hover { color: #fff; }
.header__right { display: flex; align-items: center; gap: 22px; }
/* Перемикач мови UA / PL */
.lang { display: flex; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.lang__btn { border: none; background: none; padding: 5px 11px; border-radius: 999px; font: 700 .78rem/1 var(--font-text); letter-spacing: .04em; color: var(--color-muted); cursor: pointer; transition: background .2s, color .2s; }
.lang__btn:hover { color: #fff; }
.lang__btn.active { background: var(--gradient); color: #fff; }
.burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; position: relative; z-index: 101; }
.burger span { width: 26px; height: 3px; background: #fff; border-radius: 2px; transition: .3s; }
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Головний екран ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero__glow {
  position: absolute; width: 700px; height: 700px; top: -150px; right: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,.45), transparent 65%);
  animation: glow 10s ease-in-out infinite alternate;
}
.hero__glow::after {
  content: ''; position: absolute; width: 500px; height: 500px; left: -500px; top: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.25), transparent 65%);
}
@keyframes glow { to { transform: translate(-120px, 80px) scale(1.15); } }
.hero__content { position: relative; padding: 130px 0 80px; }
.hero__tag { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-size: .9rem; margin-bottom: 26px; }
.hero__tag i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero__title { font-family: var(--font-title); font-weight: 800; font-size: clamp(2rem, 5.5vw, 4.2rem); line-height: 1.12; margin-bottom: 26px; }
.hero__title .accent { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Після розбиття на слова (fx-kit) градієнт малюємо на самому слові, бо воно рухається окремо */
.hero__title .accent:has(.fx-w) { background: none; }
.hero__title .accent .fx-wi { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__text { max-width: 580px; font-size: 1.15rem; color: var(--color-muted); margin-bottom: 36px; }
.hero__text b { color: #fff; }
.hero__buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero__facts { list-style: none; display: flex; gap: 44px; flex-wrap: wrap; color: var(--color-muted); font-size: .95rem; }
.hero__facts b { display: block; font-family: var(--font-title); font-size: 1.8rem; color: #fff; }

/* ---------- Секції ---------- */
.section { padding: 100px 0; }
.section--alt { background: var(--color-bg-alt); }
.section__tag { text-align: center; text-transform: uppercase; letter-spacing: 3px; font-size: .8rem; font-weight: 600; color: var(--color-b); margin-bottom: 10px; }
.section__title { text-align: center; font-family: var(--font-title); font-weight: 800; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.2; margin-bottom: 18px; }
.section__subtitle { text-align: center; color: var(--color-muted); margin-bottom: 56px; }
.section--alt .section__title, #services .section__title, #process .section__title { margin-bottom: 52px; }
#niches .section__title { margin-bottom: 18px; }

/* ---------- Бігучий рядок з нішами (fx-kit) ---------- */
.niches-strip { --speed: 45s; padding: 20px 0; border-block: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.02); }
.niches-strip span { font-family: var(--font-title); font-weight: 600; font-size: clamp(1rem, 2vw, 1.35rem); padding: 0 22px; }
.niches-strip i { font-style: normal; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Роботи ---------- */
.works__group { font-size: .85rem; text-transform: uppercase; letter-spacing: 2px; color: var(--color-muted); font-weight: 600; margin: 0 0 18px; display: flex; align-items: center; gap: 14px; }
.works__group::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.08); }
.works + .works__group { margin-top: 56px; }
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.works--pro { grid-template-columns: repeat(2, 1fr); }
.work { background: var(--color-card); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.06); transition: transform .35s, border-color .35s; }
.work:hover { transform: translateY(-8px); border-color: rgba(124,92,255,.5); }
/* Живий мініатюрний перегляд сайту: iframe 1280×800, зменшений під ширину картки */
.work__preview { display: block; position: relative; aspect-ratio: 16/10; overflow: hidden; background: #0f1222; }
.work__preview iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; }
.work__preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(22,26,51,.6)); transition: opacity .3s; }
.work:hover .work__preview::after { opacity: 0; }
.work__info { padding: 24px 26px 28px; }
.work__niche { display: inline-block; font-size: .78rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(124,92,255,.15); color: #b9a8ff; margin-bottom: 12px; }
.work h4 { font-family: var(--font-title); font-size: 1.2rem; margin-bottom: 8px; }
.work p { color: var(--color-muted); font-size: .95rem; margin-bottom: 16px; }
/* Позначка і теги для розширених проєктів */
.work__badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--gradient); color: #fff; font-size: .75rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.work--pro { border-color: rgba(124,92,255,.35); }
.work__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.work__tags li { font-size: .75rem; color: #cfd3f5; border: 1px solid rgba(255,255,255,.12); padding: 3px 10px; border-radius: 999px; }
.work__link { font-weight: 600; color: var(--color-b); }
.work__link:hover { text-decoration: underline; }

/* ---------- Для кого (ніші) ---------- */
.niches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.niche { background: var(--color-card); padding: 24px 22px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.05); transition: border-color .3s, transform .3s; }
.niche:hover { border-color: rgba(34,211,238,.4); transform: translateY(-4px); }
.niche span { font-size: 1.6rem; display: block; margin-bottom: 12px; }
.niche h3 { font-size: 1.02rem; margin-bottom: 6px; line-height: 1.35; }
.niche p { color: var(--color-muted); font-size: .9rem; }
.niche--cta { background: linear-gradient(var(--color-card), var(--color-card)) padding-box, var(--gradient) border-box; border: 1px solid transparent; }

/* ---------- Що входить ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--color-card); padding: 30px 26px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.05); }
.feature span { font-size: 1.8rem; display: block; margin-bottom: 14px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--color-muted); font-size: .95rem; }

/* ---------- Ціни ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: center; }
.plan { position: relative; background: var(--color-card); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 36px 30px; display: flex; flex-direction: column; }
.plan h3 { font-size: 1.1rem; color: var(--color-muted); font-weight: 600; }
.plan__price { font-family: var(--font-title); font-weight: 800; font-size: 2.2rem; margin: 6px 0; }
.plan__desc { color: var(--color-muted); font-size: .95rem; margin-bottom: 22px; }
.plan ul { list-style: none; display: grid; gap: 10px; margin-bottom: 30px; }
.plan li::before { content: '✓  '; color: var(--color-b); font-weight: 700; }
.plan--hit { padding: 50px 30px; border: none; background: linear-gradient(var(--color-card), var(--color-card)) padding-box, var(--gradient) border-box; border: 2px solid transparent; }
.plan__badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--gradient); padding: 5px 16px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }

/* ---------- Процес ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: none; }
.steps li { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--color-card); }
.steps b { font-family: var(--font-title); font-size: 2rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps h3 { margin: 8px 0; font-size: 1.1rem; }
.steps p { color: var(--color-muted); font-size: .95rem; }

/* ---------- Контакти ---------- */
.contacts__inner {
  text-align: center; padding: 70px 30px; border-radius: 32px;
  background: radial-gradient(circle at 20% 0%, rgba(124,92,255,.35), transparent 55%), radial-gradient(circle at 90% 100%, rgba(34,211,238,.25), transparent 55%), var(--color-card);
  border: 1px solid rgba(255,255,255,.08);
}
.contacts__inner p { color: var(--color-muted); max-width: 520px; margin: 0 auto 34px; font-size: 1.1rem; }
.contacts__buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.contact { padding: 16px 32px; border-radius: 999px; font-weight: 600; font-size: 1.05rem; transition: transform .25s, box-shadow .25s; }
.contact:hover { transform: translateY(-3px); }
.contact--tg { background: #229ed9; }
.contact--tg:hover { box-shadow: 0 12px 30px rgba(34,158,217,.45); }
.contact--ig { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.contact--ig:hover { box-shadow: 0 12px 30px rgba(221,42,123,.45); }

.footer { padding: 30px 0; text-align: center; color: var(--color-muted); font-size: .9rem; border-top: 1px solid rgba(255,255,255,.06); }

/* =========================================================
   АНІМАЦІЯ ПРИ СКРОЛІ
   ========================================================= */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Смужка прогресу прокрутки — у кольорах сайту */
.fx-progress { --fx-progress: var(--gradient); height: 3px; }

/* =========================================================
   МОБІЛЬНА ВЕРСІЯ
   ========================================================= */
@media (max-width: 960px) {
  .works, .plans { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .works__group { max-width: 560px; margin-left: auto; margin-right: auto; }
  .features, .niches { grid-template-columns: 1fr 1fr; }
  .nav { gap: 20px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .burger { display: flex; }
  .nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: 75%; max-width: 320px;
    background: #0d1020; flex-direction: column; justify-content: center; gap: 28px; font-size: 1.15rem;
    transform: translateX(100%); transition: transform .35s ease;
  }
  .nav.open { transform: none; box-shadow: -10px 0 40px rgba(0,0,0,.5); }
  .section { padding: 70px 0; }
  .features, .steps { grid-template-columns: 1fr; }
  .header__right { gap: 14px; }
  .niches { gap: 12px; }
  .niche { padding: 18px 16px; }
  .niche h3 { font-size: .95rem; }
  .niche p { font-size: .85rem; }
  .hero__facts { gap: 26px; }
  .hero__glow { width: 450px; height: 450px; right: -220px; }
  .contacts__inner { padding: 50px 22px; }
}
@media (max-width: 480px) {
  .hero__buttons .btn, .contact { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, .reveal { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
