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

:root {
  --bg-deep: #0a0620;
  --bg-mid: #1a0a3d;
  --bg-card: #12082e;
  --purple: #6b0c9e;
  --purple-bright: #811fb5;
  --purple-soft: #9e5dfa;
  --blue: #2aa1e8;
  --blue-deep: #067dff;
  --text: #ffffff;
  --text-muted: #c8c4d8;
  --text-dark: #161616;
  --gray-card: #ededed;
  --review-title: #8ec8ff;
  --radius-lg: 36px;
  --radius-md: 22px;
  --radius-sm: 12px;
  --container: 1120px;
  --font: "Play", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #3a1470 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 30%, #1a0a50 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 60%, #2a0a55 0%, transparent 45%),
    linear-gradient(180deg, #12082e 0%, #0a0620 40%, #08051a 100%);
  background-attachment: fixed;
  line-height: 1.45;
  overflow-x: hidden;
}

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

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

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

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 16px 24px;
  background: rgba(10, 6, 32, 0.55);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 40px;
}

.nav a,
.footer__nav a,
.mobile-menu__nav a {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav a:hover,
.footer__nav a:hover,
.mobile-menu__nav a:hover {
  color: var(--purple-soft);
}

.menu-toggle {
  display: none;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(8, 5, 26, 0.96);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 40px;
  color: #fff;
  line-height: 1;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  font-size: 22px;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--purple {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 8px 24px rgba(107, 12, 158, 0.35);
}

.btn--purple:hover {
  background: var(--purple-bright);
}

.btn--white {
  background: #fff;
  color: #111;
}

.btn--white:hover {
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

/* Hero */
.hero {
  padding: 24px 20px 48px;
}

.hero__card {
  width: min(100%, 1240px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  align-items: end;
  gap: 12px;
  min-height: 420px;
  padding: 48px 40px 0;
  border-radius: 40px;
  background: linear-gradient(135deg, #1e0c46 0%, #0c123c 55%, #1a0a50 100%);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero__content {
  min-width: 0;
  padding-bottom: 48px;
}

.hero__title {
  margin: 0 0 28px;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.05;
  font-weight: 700;
  text-transform: uppercase;
}

.hero__title-white {
  display: block;
  color: #fff;
  white-space: nowrap;
}

.hero__title-accent {
  display: block;
  color: #a855f7;
}

.hero__name {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.hero__role {
  margin: 0 0 28px;
  font-size: 16px;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__photo {
  align-self: end;
  justify-self: end;
  width: min(100%, 420px);
  margin-bottom: 0;
}

.hero__photo img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 0;
}

/* About / Trust */
.about {
  padding: 40px 0 80px;
}

.section-title {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark);
  letter-spacing: 0.02em;
}

.section-title--light {
  color: #fff;
}

.about__lead {
  margin: 0 0 36px;
  max-width: 720px;
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 400;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.trust-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 24px 20px;
  border-radius: var(--radius-md);
  background: #fff;
  color: #111;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
  cursor: default;
}

.trust-card:hover {
  background: linear-gradient(129.96deg, #6b0c9e 26%, #041275 84%);
  color: #fff;
  box-shadow: 0 14px 36px rgba(107, 12, 158, 0.35);
  transform: translateY(-2px);
}

/* Services */
.services {
  position: relative;
  margin-top: -20px;
  padding: 72px 0 64px;
  background: #fff;
  border-radius: 64px 64px 0 0;
  color: var(--text-dark);
}

.services__subtitle {
  margin: 0 0 36px;
  font-size: 18px;
  color: #666;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.service-card {
  perspective: 1000px;
  min-height: 140px;
  cursor: pointer;
}

.service-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 140px;
  transition: transform 0.55s ease;
  transform-style: preserve-3d;
}

.service-card:hover .service-card__inner {
  transform: rotateY(180deg);
}

.service-card__front,
.service-card__back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 24px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.service-card__front {
  background: var(--gray-card);
  color: #111;
}

.service-card__back {
  background: linear-gradient(129.96deg, #6b0c9e 26%, #041275 84%);
  color: #fff;
  transform: rotateY(180deg);
  box-shadow: 0 14px 36px rgba(107, 12, 158, 0.35);
}

.services__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

/* Cases */
.cases {
  padding: 64px 0 80px;
  background: #fff;
  color: var(--text-dark);
}

.cases .section-title {
  text-align: center;
  margin-bottom: 40px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.case-card {
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  overflow: hidden;
  background: #1a1f36;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(20, 10, 50, 0.25);
}

.case-card__image {
  margin: 14px 14px 0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 2 / 1;
}

.case-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-card__text {
  margin: 0;
  padding: 18px 20px 22px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

/* Reviews */
.reviews {
  padding: 80px 0;
  background:
    linear-gradient(180deg, #0d0830 0%, #140a3a 50%, #0a0620 100%);
}

.reviews .section-title {
  margin-bottom: 36px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.review-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px 28px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.review-card__title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--review-title);
}

.review-card__text {
  margin: 0;
  flex: 1;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.review-card__author {
  margin: 18px 0 0;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* Contacts — layout coords from Tilda 1200 artboard */
.contacts {
  padding: 60px 0 40px;
}

.contacts-cloud {
  --cloud-w: 1200;
  --cloud-h: 450;
  --cloud-oy: 70;
  position: relative;
  width: min(100%, 1200px);
  aspect-ratio: 1200 / 450;
  margin: 0 auto 48px;
}

.cloud-tag {
  position: absolute;
  left: calc(var(--x) / var(--cloud-w) * 100%);
  top: calc((var(--y) - var(--cloud-oy)) / var(--cloud-h) * 100%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(74 / var(--cloud-h) * 100%);
  padding: 0 clamp(18px, 2.2vw, 28px);
  border-radius: 12px;
  font-size: clamp(14px, 1.7vw, 22px);
  font-weight: 700;
  white-space: nowrap;
  transform: rotate(var(--rot, 0deg));
  transform-origin: center center;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.cloud-tag--blue {
  border: 2px solid var(--blue);
  box-shadow: 0 0 18px rgba(42, 161, 232, 0.25);
}

.cloud-tag--purple {
  border: 2px solid var(--purple);
  box-shadow: 0 0 18px rgba(107, 12, 158, 0.3);
}

.cloud-tag:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: rotate(var(--rot, 0deg)) scale(1.04);
  z-index: 5;
}

.cloud-tag--amocrm { --x: 136; --y: 94; --rot: -24deg; }
.cloud-tag--youtube { --x: 65; --y: 238; --rot: -12deg; }
.cloud-tag--sew { --x: 178; --y: 285; --rot: -17deg; }
.cloud-tag--mp { --x: 590; --y: 252; --rot: -6deg; }
.cloud-tag--space { --x: 850; --y: 102; --rot: 25deg; }
.cloud-tag--instagram { --x: 576; --y: 364; --rot: 0deg; }
.cloud-tag--passive { --x: 813; --y: 349; --rot: 11deg; }
.cloud-tag--tgchannel { --x: 575; --y: 150; --rot: 5deg; }

.cloud-icon {
  position: absolute;
  left: calc(var(--x) / var(--cloud-w) * 100%);
  top: calc((var(--y) - var(--cloud-oy)) / var(--cloud-h) * 100%);
  z-index: 3;
  display: grid;
  place-items: center;
  width: calc(88 / var(--cloud-w) * 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--blue);
  transition: transform 0.2s ease;
}

.cloud-icon:hover {
  transform: scale(1.08);
}

.cloud-icon img {
  filter: brightness(0) invert(1);
  width: 42%;
  height: 42%;
}

.cloud-icon--tg {
  --x: 444;
  --y: 141;
}

.cloud-icon--vk {
  --x: 455;
  --y: 374;
}

.contacts__note {
  position: absolute;
  left: calc(585 / var(--cloud-w) * 100%);
  top: calc((452 - var(--cloud-oy)) / var(--cloud-h) * 100%);
  z-index: 2;
  margin: 0;
  width: calc(195 / var(--cloud-w) * 100%);
  font-size: clamp(8px, 0.85vw, 10px);
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.contacts__title {
  margin: 0;
  text-align: center;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

/* Legal */
.legal {
  padding: 24px 0 40px;
  text-align: center;
}

.legal__title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #9a7bb8;
}

.legal__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #8a6fa3;
}

.legal__text a:hover {
  color: #fff;
}

/* Footer */
.footer {
  padding: 28px 20px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  width: min(100%, var(--container));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px 48px;
}

.footer__logo {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}

.footer__logo img {
  display: block;
  width: auto;
  height: clamp(52px, 6vw, 72px);
  object-fit: contain;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 20px 36px;
}

/* Cookie */
.cookie {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 150;
  width: min(320px, calc(100vw - 40px));
  padding: 20px 18px 18px;
  border-radius: 16px;
  background: #fff;
  color: #222;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.cookie[hidden] {
  display: none;
}

.cookie__close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  color: #666;
  line-height: 1;
}

.cookie__text {
  margin: 0 0 14px;
  padding-right: 16px;
  font-size: 13px;
  line-height: 1.4;
}

.cookie__accept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 22px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.cookie__accept:hover {
  background: #333;
}

/* To top */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 140;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  box-shadow: 0 8px 24px rgba(107, 12, 158, 0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.to-top[hidden] {
  display: none;
}

.to-top:hover {
  transform: translateY(-2px);
  background: var(--purple-bright);
}

/* Responsive */
@media (max-width: 980px) {
  .hero__card {
    grid-template-columns: 1fr;
    padding: 36px 28px 0;
    text-align: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__photo {
    justify-self: center;
  }

  .trust-grid,
  .services-grid,
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacts-cloud {
    aspect-ratio: auto;
    min-height: auto;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
  }

  .cloud-tag,
  .cloud-icon,
  .contacts__note {
    position: static;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    transform: none !important;
  }

  .cloud-icon {
    width: 64px;
  }

  .cloud-tag {
    white-space: normal;
    text-align: center;
    padding: 14px 22px;
  }

  .contacts__note {
    width: 100%;
    max-width: none;
    text-align: center;
    font-size: 11px;
    text-transform: none;
  }
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header {
    justify-content: flex-start;
  }

  .trust-grid,
  .services-grid,
  .cases-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .services {
    border-radius: 40px 40px 0 0;
    padding-top: 48px;
  }

  .about__lead br {
    display: none;
  }

  .hero__title {
    font-size: 30px;
  }

  .hero__title-white {
    white-space: normal;
  }
}

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

  .service-card__inner,
  .case-card,
  .btn,
  .cloud-tag {
    transition: none;
  }
}
