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

:root {
  --black: #0A0A0B;
  --gray-bg: #F1F1EF;
  --white: #FFFFFF;

  --text: #0A0A0B;
  --text-secondary: #5C5C5A;
  --text-muted: #8E8E8C;

  --dark-text: #ECECEA;
  --dark-text-secondary: #9A9A98;

  --line-gray: #D8D8D6;
  --line-white: #E5E5E3;
  --line-dark: rgba(255, 255, 255, 0.08);

  --maxw: 1280px;
  --pad-x: 48px;
  --section-y: 140px;
}

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== LAYOUT ===== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  width: 100%;
}

.section { padding: var(--section-y) 0; }
.section--white { background: var(--white); }
.section--gray { background: var(--gray-bg); }

.section-head { text-align: center; margin-bottom: 80px; }

.section-title {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.section-subtitle {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 24px auto 0;
  text-wrap: pretty;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 500;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn--white {
  background: var(--white);
  color: var(--black);
  padding: 12px 28px;
  border-radius: 100px;
}
.btn--white:hover { opacity: 0.9; }

.btn--black {
  background: var(--black);
  color: var(--white);
  padding: 16px 32px;
  border-radius: 100px;
}
.btn--black:hover { opacity: 0.85; }

.btn--text {
  background: transparent;
  color: var(--text);
  padding: 16px 0;
  border-bottom: 1px solid var(--text);
  border-radius: 0;
}
.btn--text:hover { opacity: 0.6; }

/* ===== Выравнивание текста по ширине ===== */
main p {
  text-align: justify;
}
/* Центрированные подзаголовки секций не трогаем */
.section-head p { text-align: center; }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  overflow-x: clip;
  transition: transform 0.35s ease, background 0.35s ease;
}

/* На главной шапка прозрачная поверх hero, после скролла получает фон */
.header--overlay { background: transparent; }
.header--overlay.header--solid { background: var(--black); }
.header__glow { transition: opacity 0.35s ease; }
.header--overlay .header__glow { opacity: 0; }
.header--overlay.header--solid .header__glow { opacity: 1; }


/* Слой-обрезка для переливов, ограничен полосой шапки 80px */
.header__glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Плавные фиолетово-пурпурные переливы света — два слоя, движутся навстречу */
.header__glow::before,
.header__glow::after {
  content: "";
  position: absolute;
  inset: -100%;
  pointer-events: none;
  filter: blur(30px);
}

.header__glow::before {
  background:
    radial-gradient(34% 120% at 20% 40%, rgba(140, 60, 200, 0.60), transparent 60%),
    radial-gradient(30% 110% at 55% 65%, rgba(190, 45, 110, 0.48), transparent 62%),
    radial-gradient(38% 130% at 82% 30%, rgba(96, 48, 190, 0.55), transparent 60%);
  animation: headerFlowA 12s ease-in-out infinite alternate;
}

.header__glow::after {
  background:
    radial-gradient(30% 120% at 12% 60%, rgba(170, 40, 130, 0.42), transparent 60%),
    radial-gradient(36% 130% at 48% 30%, rgba(110, 55, 205, 0.48), transparent 62%),
    radial-gradient(28% 110% at 90% 70%, rgba(200, 50, 120, 0.40), transparent 60%);
  mix-blend-mode: screen;
  animation: headerFlowB 9s ease-in-out infinite alternate;
}

@keyframes headerFlowA {
  0%   { transform: translate3d(-10%, -4%, 0) rotate(-6deg) scale(1.1); }
  50%  { transform: translate3d(8%, 5%, 0)   rotate(5deg)  scale(1.3); }
  100% { transform: translate3d(14%, -6%, 0) rotate(10deg) scale(1.15); }
}

@keyframes headerFlowB {
  0%   { transform: translate3d(12%, 5%, 0)   rotate(8deg)  scale(1.2); }
  50%  { transform: translate3d(-9%, -6%, 0)  rotate(-7deg) scale(1.35); }
  100% { transform: translate3d(-14%, 4%, 0)  rotate(-3deg) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .header__glow::before,
  .header__glow::after { animation: none; }
}

.header__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  height: 80px;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark-text);
  letter-spacing: -0.01em;
}

.nav { display: flex; gap: 48px; }
.nav__link {
  font-size: 18px;
  font-weight: 500;
  color: var(--dark-text);
  transition: opacity 0.2s ease;
}
.nav__link:hover { opacity: 0.7; }

.burger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  background: var(--black);
  padding: 0 var(--pad-x);
  border-top: 1px solid transparent;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
}
.mobile-menu.is-open {
  max-height: 520px;
  opacity: 1;
  padding: 16px var(--pad-x) 32px;
  border-top-color: var(--line-dark);
}
.mobile-menu__link {
  font-size: 18px;
  font-weight: 500;
  color: var(--dark-text);
  padding: 16px 0;
  border-bottom: 1px solid var(--line-dark);
}
.mobile-menu__cta { margin-top: 24px; align-self: flex-start; }

/* ===== HERO ===== */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

/* Фиолетовый hero в стиле «переливы света», шапка ложится поверх */
.hero--purple {
  position: relative;
  margin-top: -80px;      /* заезжаем под прозрачную шапку */
  padding-top: 140px;
  padding-bottom: 60px;
  min-height: 68vh;
  background: #0d0916;
  color: var(--white);
  overflow: hidden;
}

.hero__flow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__flow::before,
.hero__flow::after {
  content: "";
  position: absolute;
  inset: -35%;
  filter: blur(55px);
}
/* Диагональные «лучи» — тёмно-фиолетовые полосы света, как шёлк */
.hero__flow::before {
  background:
    linear-gradient(112deg,
      transparent 6%,
      rgba(140, 105, 230, 0.42) 14%,
      rgba(20, 12, 40, 0.0) 26%,
      rgba(88, 58, 190, 0.50) 36%,
      rgba(10, 6, 22, 0.55) 48%,
      rgba(160, 120, 240, 0.34) 58%,
      transparent 70%,
      rgba(105, 70, 210, 0.40) 82%,
      transparent 94%);
  animation: heroFlowA 22s ease-in-out infinite alternate;
}
.hero__flow::after {
  background:
    linear-gradient(108deg,
      transparent 10%,
      rgba(60, 35, 130, 0.45) 22%,
      transparent 34%,
      rgba(170, 130, 245, 0.28) 46%,
      rgba(8, 5, 18, 0.6) 60%,
      rgba(120, 80, 220, 0.32) 74%,
      transparent 88%);
  mix-blend-mode: screen;
  animation: heroFlowB 16s ease-in-out infinite alternate;
}
/* Лучи скользят вдоль своей оси */
@keyframes heroFlowA {
  0%   { transform: translate3d(-9%, 3%, 0) rotate(-2deg) scale(1.15); }
  100% { transform: translate3d(9%, -3%, 0) rotate(2deg)  scale(1.25); }
}
@keyframes heroFlowB {
  0%   { transform: translate3d(8%, -2%, 0)  rotate(2deg)  scale(1.2); }
  100% { transform: translate3d(-8%, 3%, 0)  rotate(-3deg) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__flow::before,
  .hero__flow::after { animation: none; }
}

.hero__content { position: relative; z-index: 1; }

.hero--purple .eyebrow { color: rgba(236, 236, 234, 0.65); }
.hero--purple .hero__subtitle { color: rgba(236, 236, 234, 0.75); }

.btn--lg { padding: 16px 32px; }
.btn--text-light {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.6);
}
.hero__title {
  font-size: 88px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-top: 28px;
  max-width: 1100px;
  text-wrap: balance;
}
.hero__subtitle {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 720px;
  margin-top: 32px;
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
  flex-wrap: wrap;
}

/* ===== TRUST ===== */
.trust { padding: 100px 0; }
.trust__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.trust__item {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  max-width: 320px;
  padding: 0 48px;
  text-wrap: pretty;
}
.trust__item:first-child { padding-left: 0; }
.trust__item + .trust__item { border-left: 1px solid var(--line-gray); }

/* ===== APPROACH ===== */
.approach__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.approach__col {
  border-top: 1px solid var(--line-white);
  padding-top: 32px;
}
.approach__num {
  display: block;
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.approach__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 24px;
}
.approach__text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 16px;
  text-wrap: pretty;
}

/* ===== SERVICES ===== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 64px;
}
.service-card {
  border-top: 1px solid var(--line-gray);
  padding-top: 24px;
}
.service-card__label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.service-card__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin-top: 24px;
  letter-spacing: -0.01em;
}
.service-card__text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 16px;
  text-wrap: pretty;
}

/* ===== CASES ===== */
.cases__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 64px;
}
.case-card {
  border-top: 1px solid var(--line-white);
  padding-top: 24px;
}
.case-card__cat {
  display: block;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.case-card__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-top: 20px;
  text-wrap: pretty;
}
.case-card__text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 12px;
  text-wrap: pretty;
}

/* ===== STACK ===== */
.pill {
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.field { display: flex; flex-direction: column; }
.field__label {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.field__input {
  font-family: inherit;
  font-size: 17px;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-gray);
  height: 52px;
  padding: 14px 0;
  border-radius: 0;
  transition: border-color 0.2s ease;
}
.field__input:focus {
  outline: none;
  border-bottom-color: var(--black);
}
.field__textarea {
  height: auto;
  min-height: 132px;
  resize: vertical;
  line-height: 1.5;
}
.contact-form__submit {
  align-self: center;
  padding: 18px 40px;
  margin-top: 16px;
}
.contact-form__note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -4px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  padding: 100px 0;
  color: var(--dark-text);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.footer__logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark-text);
  letter-spacing: -0.01em;
}
.footer__slogan {
  font-size: 16px;
  color: var(--dark-text-secondary);
  max-width: 400px;
  margin-top: 20px;
  line-height: 1.5;
}
.footer__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.footer__heading {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark-text-secondary);
  margin-bottom: 24px;
}
.footer__contact {
  font-size: 17px;
  color: var(--dark-text);
  transition: opacity 0.2s ease;
}
.footer__contact:hover { opacity: 0.7; }
.footer__contact + .footer__contact { margin-top: 12px; }
.footer__bottom {
  border-top: 1px solid var(--line-dark);
  margin-top: 60px;
  padding-top: 32px;
}
.footer__copy {
  text-align: center;
  font-size: 13px;
  color: var(--dark-text-secondary);
}

/* ===== RESPONSIVE: 1024px ===== */
@media (max-width: 1024px) {
  .hero__title { font-size: 72px; }
  .section-title { font-size: 48px; }
  .cases__grid { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 32px; }
}

/* ===== RESPONSIVE: 768px ===== */
@media (max-width: 768px) {
  :root {
    --pad-x: 20px;
    --section-y: 80px;
  }

  .nav,
  .header__cta { display: none; }
  .burger { display: block; }

  .section-head { margin-bottom: 48px; }
  .section-title { font-size: 36px; }
  .section-subtitle { font-size: 18px; }

  .hero { min-height: auto; padding: 80px 0; }
  .hero--purple { min-height: auto; margin: -80px 0 0; border-radius: 0; padding: 130px 0 56px; }
  .hero__title { font-size: 48px; }
  .hero__subtitle { font-size: 18px; }
  .hero__actions { gap: 24px; }

  .trust { padding: 64px 0; }
  .trust__grid { grid-template-columns: 1fr; }
  .trust__item {
    max-width: none;
    padding: 24px 0;
  }
  .trust__item:first-child { padding-top: 0; }
  .trust__item + .trust__item {
    border-left: none;
    border-top: 1px solid var(--line-gray);
  }

  .approach__grid { grid-template-columns: 1fr; gap: 48px; }
  .services__grid { grid-template-columns: 1fr; gap: 48px; }
  .cases__grid { grid-template-columns: 1fr; gap: 48px; }

  .service-card__title { font-size: 24px; }

  .footer { padding: 64px 0; }
  .footer__grid { grid-template-columns: 1fr; gap: 48px; }
  .footer__right { align-items: flex-start; text-align: left; }
}

/* ===== CASES: главная, 4 карточки 2x2 + ссылка ===== */
.cases__more {
  margin-top: 64px;
  text-align: center;
}

/* ===== СТРАНИЦА КЕЙСОВ ===== */
.page-hero {
  padding: 100px 0 80px;
}
.page-hero__title {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 24px;
  max-width: 900px;
  text-wrap: balance;
}
.page-hero__subtitle {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 680px;
  margin-top: 24px;
  text-wrap: pretty;
}

.cases-page .case-full + .case-full {
  margin-top: 80px;
}
.case-full {
  border-top: 1px solid var(--line-gray);
  padding-top: 32px;
}
.case-full__cat {
  display: block;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.case-full__title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 20px;
  max-width: 820px;
  text-wrap: balance;
}
.case-full__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 40px;
}
.case-full__label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.case-full__text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 14px;
  text-wrap: pretty;
}
.case-full--placeholder {
  opacity: 0.45;
}

.nav__link--active {
  opacity: 0.7;
}

.cases-cta__actions {
  text-align: center;
}

@media (max-width: 768px) {
  .page-hero { padding: 64px 0 48px; }
  .page-hero__title { font-size: 40px; }
  .page-hero__subtitle { font-size: 18px; }
  .case-full__title { font-size: 26px; }
  .case-full__grid { grid-template-columns: 1fr; gap: 28px; }
  .cases-page .case-full + .case-full { margin-top: 56px; }
}

/* ===== ФОРМА: honeypot и статус ===== */
.field--hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}
.contact-form { position: relative; }
.contact-form__status {
  text-align: center;
  font-size: 15px;
  min-height: 22px;
  margin-top: -8px;
}
.contact-form__status.is-ok { color: #1a7f37; }
.contact-form__status.is-err { color: #b42318; }
.contact-form__submit[disabled] { opacity: 0.5; cursor: default; }


/* ===== СТЕК: облако ===== */
.stack__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}

/* ===== Ссылка-демо на карточке кейса ===== */
.case-card__link {
  display: inline-block;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity .15s;
}
.case-card__link:hover { opacity: 0.6; }

/* ===== Согласие на обработку ПДн ===== */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 4px;
}
.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--black);
  cursor: pointer;
  flex-shrink: 0;
}
.consent a {
  border-bottom: 1px solid currentColor;
}
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
a.footer__copy:hover { color: var(--dark-text); }
