/* ═══════════════════════════════
   PRODUCT CARD
   ═══════════════════════════════ */

.product-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #cacadd;
  border-radius: 50px;
  /* title y:57, bottom: 501−425−31=45px → padding-bottom:45 */
  padding: 57px 44px 45px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.65);
  transform-origin: 70px calc(100% - 58px);
  background:
    radial-gradient(circle at 70px calc(100% - 58px),
      rgba(193, 213, 251, 0.55) 0%,
      rgba(193, 213, 251, 0.28) 32%,
      rgba(193, 213, 251, 0) 66%);
  transition: opacity 0.35s ease, transform 0.5s ease;
}

.product-card__body {
  flex: 1 1 auto;
  overflow: hidden;
  /* clearfix for float */
}

/* Icon floats right so text wraps around it */
.product-card__icon {
  float: right;
  width: 102px;
  height: 101px;
  border-radius: 31px;
  display: block;
  object-fit: cover;
  margin-left: 20px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.product-card__name {
  font-family: var(--font-secondary);
  font-size: 44.69px;
  font-weight: 700;
  color: #2b2b3a;
  line-height: 1.23;
}

.product-card__desc {
  font-family: var(--font-secondary);
  font-size: 26px;
  font-weight: 400;
  color: #2b2b3a;
  line-height: 1.35;
  /* title h≈55, gap = 148−57−55 = 36px */
  margin-top: 36px;
  list-style-type: disc;
  list-style-position: outside;
  padding-left: 1.2em;
}

.product-card__desc li {
  overflow-wrap: break-word;
}

.product-card__desc li+li {
  margin-top: 0.2em;
}

.products-grid>.products-page:first-child .product-card:first-child .product-card__desc {
  font-size: 28px;
}

/* "Перейти ——" link — indented 40px from content left (Figma: link x:84 − padding-left:44 = 40) */
.product-card__link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: 400;
  color: #3f9cdf;
  text-decoration: none;
  margin-top: auto;
  padding-top: 24px;
  margin-left: 34px;
  transition: filter 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .product-card__link:hover {
    filter: brightness(1.3);
  }

  .product-card__link:hover::after {
    transform: translateX(15px);
  }

  /* Precise trigger: animate card only when link is hovered */
  .product-card:has(.product-card__link:hover)::before {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* Horizontal arrow line after text */
.product-card__link::after {
  content: '';
  display: block;
  width: 42px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='12' viewBox='0 0 42 12' fill='none'%3E%3Cpath d='M1 6H41M36 1L41 6L36 11' stroke='%233f9cdf' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
  transition: transform 0.25s ease, filter 0.2s ease;
}

/* Intentionally no fallback: hover only on the link */

/* ═══════════════════════════════
   PRODUCTS CAROUSEL NAV (mobile)
   ═══════════════════════════════ */

.products-carousel-nav {
  display: none;
  grid-template-columns: 50px auto 50px;
  align-items: center;
  justify-content: center;
  column-gap: 16px;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 0;
  touch-action: pan-y;
}

.carousel-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 50px;
  height: 59px;
  border-radius: 7px;
  background: #a2bdef;
  /* border: 1px solid #d6f033; */
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.carousel-nav-btn:hover {
  opacity: 0.8;
}

.carousel-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-nav-label {
  font-family: var(--font-secondary);
  font-size: 20px;
  font-weight: 400;
  color: #2b2b3a;
}

/* ═══════════════════════════════
   SMM SECTION TEXT & VISUALS
   ═══════════════════════════════ */

.smm-section__title {
  font-family: var(--font-secondary);
  font-size: clamp(36px, 3.33vw, 64px);
  font-weight: 700;
  line-height: 1.22;
  color: #2b2b3a;
}

/* Gradient text for "SMM" */
.smm-gradient {
  background: linear-gradient(90deg, #F5EF66 0%, #1FC7A3 48%, #1C83E0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.smm-section__text {
  font-family: var(--font-secondary);
  font-size: clamp(18px, 1.72vw, 33px);
  font-weight: 500;
  line-height: 1.35;
  color: #2b2b3a;
  /* gap: text y:201 − title h:~156 ≈ 45px */
  margin-top: 45px;
}

/* Warm gradient glow behind the illustration
   From Figma: Rectangle 8 — x:1027, y:77, w:365, h:365, r:84
   Gradient: F3E9C9 → F2DEA3, top-left to bottom-right
   Layer blur Progressive: Start 100 → End 30 (simulated with filter blur) */
.smm-section__glow {
  position: absolute;
  top: -10px;
  left: -30px;
  width: 365px;
  height: 365px;
  border-radius: 84px;
  background: linear-gradient(135deg, #F3E9C9 0%, #F2DEA3 100%);
  filter: blur(55px);
  z-index: 0;
  pointer-events: none;
}

.smm-section__visual-wrap {
  position: relative;
  z-index: 1;
  width: fit-content;
  pointer-events: none;
}

.smm-section__robot {
  position: relative;
  z-index: 1;
  width: clamp(272px, 31.28vw, 601px);
  height: auto;
  display: block;
}

.smm-section__badge {
  position: absolute;
  z-index: 2;
  width: clamp(71px, 7.13vw, 136px);
  height: auto;
  transform-origin: center center;
  animation: smm-badge-wiggle 16.8s ease-in-out infinite;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.18));
}

.smm-section__badge--html {
  left: 0%;
  top: 18%;
  animation-delay: -0.12s;
  animation-name: smm-badge-drift-a, smm-badge-wiggle, smm-badge-pulse;
  animation-duration: 18.4s, 16.8s, 14.6s;
  animation-delay: -0.12s, -0.12s, -3.2s;
}

.smm-section__badge--github {
  left: -4%;
  top: 48%;
  animation-delay: -0.14s;
  animation-name: smm-badge-drift-b, smm-badge-wiggle, smm-badge-pulse;
  animation-duration: 20.0s, 16.8s, 17.2s;
  animation-delay: -0.14s, -0.14s, -6.1s;
}

.smm-section__badge--go {
  left: 2%;
  top: 78%;
  animation-delay: -0.16s;
  animation-name: smm-badge-drift-c, smm-badge-wiggle, smm-badge-pulse;
  animation-duration: 19.2s, 16.8s, 15.8s;
  animation-delay: -0.16s, -0.16s, -1.7s;
}

.smm-section__badge--css {
  left: 98%;
  top: 17%;
  animation-delay: -0.12s;
  animation-name: smm-badge-drift-d, smm-badge-wiggle, smm-badge-pulse;
  animation-duration: 19.6s, 16.8s, 16.4s;
  animation-delay: -0.12s, -0.12s, -4.4s;
}

.smm-section__badge--js {
  left: 104%;
  top: 47%;
  animation-delay: -0.14s;
  animation-name: smm-badge-drift-e, smm-badge-wiggle, smm-badge-pulse;
  animation-duration: 20.8s, 16.8s, 18.0s;
  animation-delay: -0.14s, -0.14s, -8.3s;
}

.smm-section__badge--pg {
  left: 96%;
  top: 75%;
  animation-delay: -0.16s;
  animation-name: smm-badge-drift-f, smm-badge-wiggle, smm-badge-pulse;
  animation-duration: 18.8s, 16.8s, 13.8s;
  animation-delay: -0.16s, -0.16s, -5.0s;
}

@keyframes smm-badge-drift-a {

  0%,
  100% { transform: translate(-50%, -50%) translate(0, 0); }
  20% { transform: translate(-50%, -50%) translate(8px, -6px); }
  42% { transform: translate(-50%, -50%) translate(-7px, -3px); }
  60% { transform: translate(-50%, -50%) translate(6px, 9px); }
  78% { transform: translate(-50%, -50%) translate(-4px, 4px); }
}

@keyframes smm-badge-drift-b {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  18% { transform: translate(-50%, -50%) translate(-9px, -7px); }
  36% { transform: translate(-50%, -50%) translate(5px, -10px); }
  55% { transform: translate(-50%, -50%) translate(10px, 2px); }
  74% { transform: translate(-50%, -50%) translate(-3px, 9px); }
  88% { transform: translate(-50%, -50%) translate(4px, 5px); }
}

@keyframes smm-badge-drift-c {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  22% { transform: translate(-50%, -50%) translate(7px, 6px); }
  40% { transform: translate(-50%, -50%) translate(-6px, 10px); }
  58% { transform: translate(-50%, -50%) translate(-10px, -1px); }
  76% { transform: translate(-50%, -50%) translate(4px, -8px); }
  90% { transform: translate(-50%, -50%) translate(9px, 2px); }
}

@keyframes smm-badge-drift-d {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  16% { transform: translate(-50%, -50%) translate(10px, -2px); }
  34% { transform: translate(-50%, -50%) translate(3px, -9px); }
  52% { transform: translate(-50%, -50%) translate(-8px, -6px); }
  70% { transform: translate(-50%, -50%) translate(-6px, 8px); }
  86% { transform: translate(-50%, -50%) translate(5px, 6px); }
}

@keyframes smm-badge-drift-e {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  14% { transform: translate(-50%, -50%) translate(-6px, 9px); }
  32% { transform: translate(-50%, -50%) translate(9px, 7px); }
  50% { transform: translate(-50%, -50%) translate(7px, -8px); }
  68% { transform: translate(-50%, -50%) translate(-10px, -4px); }
  84% { transform: translate(-50%, -50%) translate(2px, 3px); }
}

@keyframes smm-badge-drift-f {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  19% { transform: translate(-50%, -50%) translate(6px, -10px); }
  37% { transform: translate(-50%, -50%) translate(-5px, -7px); }
  56% { transform: translate(-50%, -50%) translate(-9px, 4px); }
  73% { transform: translate(-50%, -50%) translate(10px, 6px); }
  89% { transform: translate(-50%, -50%) translate(3px, 2px); }
}

@keyframes smm-badge-wiggle {

  0%,
  100% {
    rotate: 0deg;
  }

  33.333% {
    rotate: 6deg;
  }

  66.666% {
    rotate: -6deg;
  }
}

@keyframes smm-badge-pulse {
  0%,
  100% {
    scale: 1;
  }

  25% {
    scale: 1.05;
  }

  50% {
    scale: 0.95;
  }

  75% {
    scale: 1.05;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smm-section__badge {
    animation: none;
  }
}

.smm-section__robot {
  position: relative;
  z-index: 1;
  height: auto;
  display: block;
}

/* ═══════════════════════════════
   KEY RESULT SECTION (same typography / visual as SMM)
   ═══════════════════════════════ */

.key-result__title {
  font-family: var(--font-secondary);
  font-size: clamp(36px, 3.33vw, 64px);
  font-weight: 700;
  line-height: 1.22;
  color: #2b2b3a;
}

.key-result__text {
  font-family: var(--font-secondary);
  font-size: clamp(18px, 1.72vw, 33px);
  font-weight: 500;
  line-height: 1.35;
  color: #2b2b3a;
  margin-top: 45px;
}

.key-result__text+.key-result__text {
  margin-top: clamp(16px, 1.25vw, 24px);
}

.key-result__visual img {
  position: relative;
  z-index: 1;
  width: clamp(320px, 36.8vw, 707px);
  height: auto;
  display: block;
  margin-left: 110px;
}

@media (max-width: 1200px) {
  .key-result__visual img {
    margin: 0;
  }
}

/* ═══════════════════════════════
   STAT ITEM
   ═══════════════════════════════ */

.stat-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* glow rect starts 37px above text (rect y:104, text y:141) */
  padding-top: 37px;
}

.stat-item__glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 216px;
  height: 216px;
  border-radius: 50px;
  background: linear-gradient(135deg, #F5EF66 0%, #1FC7A3 48%, #1C83E0 100%);
  opacity: 0.55;
  filter: blur(35px);
  pointer-events: none;
  z-index: 0;
}

.stat-item__number {
  position: relative;
  z-index: 1;
  font-family: var(--font-secondary);
  font-size: 61px;
  font-weight: 700;
  color: #2b2b3a;
  line-height: 1.23;
  white-space: nowrap;
}

.stat-item__desc {
  position: relative;
  z-index: 1;
  font-family: var(--font-secondary);
  font-size: 33px;
  font-weight: 400;
  color: #2b2b3a;
  line-height: 1.15;
  text-align: center;
  /* gap: desc y:93 − number h:75 = 18px */
  margin-top: 18px;
}

/* ═══════════════════════════════
   COOKIE BANNER
   ═══════════════════════════════ */

.cookie-banner__text {
  font-family: var(--font-primary);
  font-size: 30px;
  font-weight: 300;
  color: #ffffff;
  text-align: center;
  line-height: 1.2;
}

.cookie-banner__link {
  font-weight: 300;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 6px;
  transition: opacity 0.2s ease;
}

.cookie-banner__link:hover {
  opacity: 0.75;
}

.cookie-banner__ok {
  flex-shrink: 0;
  min-height: 48px;
  padding: 0 40px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: #ffffff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.cookie-banner__ok:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cookie-banner__ok:active {
  transform: translateY(1px);
}

.cta-popup__close {
  position: absolute;
  top: 30px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(202, 202, 221, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-primary);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: #2b2b3a;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .cta-popup__close:hover {
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
  }
}

.cta-popup__close:active {
  transform: translateY(0);
}

/* ═══════════════════════════════
   LOGO
   ═══════════════════════════════ */

.logo {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
}

.logo__icon {
  width: var(--logo-icon-size);
  height: var(--logo-icon-size);
  border-radius: var(--logo-icon-radius);
  flex-shrink: 0;
  object-fit: cover;
}

.logo__name {
  font-family: var(--font-primary);
  font-size: var(--fs-logo);
  font-weight: 700;
  color: var(--clr-white);
  line-height: 1;
  white-space: nowrap;
}

/* Gradient text for ".ru" */
.logo__ru {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════
   NAVIGATION
   ═══════════════════════════════ */

.nav__list {
  display: flex;
  align-items: center;
  /* Gap between nav items from Figma: ~56px */
  gap: 56px;
}

.nav__link {
  font-family: var(--font-primary);
  font-size: var(--fs-nav);
  font-weight: 400;
  color: var(--clr-nav-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--clr-white);
}

.nav__link:focus-visible {
  outline: 2px solid var(--clr-btn-border);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ═══════════════════════════════
   BURGER MENU (mobile only)
   ═══════════════════════════════ */

.burger {
  display: none;
  /* hidden on desktop */
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  /* matches Figma: width 49.58px, lines at y:37/49/61 = 12px gap */
  width: 50px;
  height: 28px;
  min-height: 28px;
}

.burger__line {
  display: block;
  width: 100%;
  height: 2px;
  min-height: 2px;
  background-color: #afd2ff;
  border-radius: 1px;
  flex-shrink: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Active state */
.burger.is-open .burger__line:nth-child(1) {
  transform: translateY(13.5px) rotate(45deg);
}

.burger.is-open .burger__line:nth-child(2) {
  opacity: 0;
}

.burger.is-open .burger__line:nth-child(3) {
  transform: translateY(-13.5px) rotate(-45deg);
}

/* ═══════════════════════════════
   BUTTON
   ═══════════════════════════════ */

.btn {
  display: inline-block;
  font-family: var(--font-secondary);
  font-size: var(--fs-btn);
  font-weight: 400;
  line-height: 1;
  color: var(--clr-white);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn--gradient {
  background: var(--gradient-accent);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn--gradient:hover {
    opacity: 0.88;
    transform: scale(1.04);
  }
}

.btn--gradient:active {
  opacity: 1;
  transform: scale(1);
}

.btn:focus-visible {
  outline: 2px solid var(--clr-white);
  outline-offset: 3px;
}

/* ═══════════════════════════════
   BACK TO TOP
   ═══════════════════════════════ */

.back-to-top {
  position: fixed;
  z-index: 55;
  right: max(clamp(12px, 3.5vw, 28px), env(safe-area-inset-right, 0px));
  bottom: max(clamp(12px, 3.5vw, 28px), env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: clamp(48px, 11vw, 56px);
  height: clamp(48px, 11vw, 56px);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 6px 20px rgba(5, 5, 22, 0.18);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.2s ease;
}

.back-to-top.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.back-to-top__icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@media (hover: hover) and (pointer: fine) {
  .back-to-top:hover {
    transform: translateY(-2px);
  }

  .back-to-top:active {
    transform: translateY(0);
  }
}

.back-to-top:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}