/* ==========================================================================
   MAIN CONTENT (pure CSS version, no JS dependencies)
   - Removed all .reveal / JS-triggered logic
   - All animations are autonomous (keyframes + delays)
   - Slider becomes scroll-snap row
   - Counters show final values immediately
   - Replaced Lottie with CSS visual placeholder
   ========================================================================== */

/* Section shell helpers (reuse global container vars) */
.sec-shell,
.hero__inner,
.capabilities__inner,
.featured-works__inner {
  width: 100%;
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

:root {
  --section-space-y: clamp(64px, 11vh, 128px);
  --ease-out: cubic-bezier(0.16, 0.84, 0.44, 1);
  --ease-slow: cubic-bezier(0.22, 0.68, 0.18, 1);
  --grad-accent: linear-gradient(135deg, #00b9ad, #009d90 55%, #00786e);
  --c-divider-soft: color-mix(in srgb, var(--c-border) 55%, transparent);
  --fx-glow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 32%, transparent);
  --fx-lift:
    0 12px 40px -14px rgba(0, 0, 0, 0.35), 0 4px 14px -6px rgba(0, 0, 0, 0.22);
  --rad-xl: clamp(26px, 4vw, 44px);
}
html[data-theme="dark"] {
  --fx-glow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 45%, transparent);
}

/* Generic section skeleton */
.sec {
  position: relative;
  padding-block: 60px;
}
.sec-head {
  max-width: 860px;
  margin: 0 0 40px;
}
.sec-title {
  margin: 0 0 14px;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.6px;
  background: linear-gradient(
    95deg,
    var(--c-text) 0%,
    color-mix(in srgb, var(--c-text) 70%, var(--c-accent)) 100%
  );
  -webkit-background-clip: text;
  color: transparent;
}
.sec-lead {
  margin: 0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  color: var(--c-text-soft);
}

/* Simple sequential animation utility */
[data-seq] > * {
  --stagger: 0;
  opacity: 0;
  transform: translateY(26px);
  animation: fadeUp 0.9s var(--ease-out) forwards;
  animation-delay: calc(var(--stagger) * 90ms);
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glow pulse subtle */
@keyframes softPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 157, 144, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 157, 144, 0.15);
  }
}

/* HERO */
.hero {
  position: relative;
  padding-block: 60px;
  overflow: clip;
  isolation: isolate;
}

.hero__inner {
  display: grid;
  gap: clamp(42px, 6vw, 96px);
  grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr));
  align-items: center;
}
.hero__content {
  display: flex;
  flex-direction: column;
  gap: 50px;
}
.hero__title {
  margin: 0;
  font-size: 58px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -1.2px;
  background: linear-gradient(
    100deg,
    var(--c-text) 0%,
    var(--c-text) 58%,
    var(--c-accent) 96%
  );
  -webkit-background-clip: text;
  color: transparent;
  position: relative;
}
.hero__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -30px;
  width: 100px;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 6px;
  filter: drop-shadow(0 0 6px rgba(0, 157, 144, 0.4));
  animation: underlineGrow 0.9s var(--ease-out) 0.3s both;
}
@keyframes underlineGrow {
  0% {
    transform: scaleX(0.25);
    transform-origin: left;
    opacity: 0.3;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}
.hero__lead {
  font-size: clamp(16px, 2.1vw, 18px);
  color: var(--c-text-soft);
  max-width: 720px;
  margin: 0;
  line-height: 1.55;
}
.hero__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
}
.btn--lg {
  height: 54px;
  font-size: 15px;
  padding-inline: 28px;
}
.btn--xl {
  height: 64px;
  font-size: 16px;
  padding-inline: 42px;
}

.btn--ghost {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  transition:
    background 0.35s,
    border-color 0.35s,
    transform 0.55s var(--ease-out),
    box-shadow 0.55s;
}
.btn--ghost:hover {
  background: var(--c-bg-alt);
  border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-border));
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.hero__visual {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroLift 1.4s var(--ease-out);
}

/* Decorative layered squares */
.hero-grid {
  width: clamp(240px, 60%, 420px);
  aspect-ratio: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
}
.hero-grid__layer {
  position: absolute;
  inset: 0;
  border: 1px solid var(--c-border);
  border-radius: 28px;
  background: linear-gradient(160deg, var(--c-bg-alt), var(--c-bg) 70%);
  box-shadow: var(--shadow-md);
  animation: layerFloat 11s var(--ease-slow) infinite;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.hero-grid__layer:nth-child(2) {
  inset: 20px;
  animation-duration: 9s;
  animation-delay: -2s;
}
.hero-grid__layer:nth-child(3) {
  inset: 40px;
  animation-duration: 7s;
  animation-delay: -4s;
}
@keyframes layerFloat {
  0%,
  100% {
    transform: translateY(-8px) rotate(-1deg);
  }
  50% {
    transform: translateY(8px) rotate(1deg);
  }
}
.hero-grid__spark {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--grad-accent);
  border-radius: 50%;
  top: 18%;
  left: 24%;
  filter: blur(1px);
  box-shadow:
    0 0 0 0 rgba(0, 157, 144, 0.5),
    0 0 14px 4px rgba(0, 157, 144, 0.5);
  animation: spark 3.8s ease-in-out infinite;
}
@keyframes spark {
  0%,
  100% {
    transform: scale(0.8) translate(0, 0);
    box-shadow:
      0 0 0 0 rgba(0, 157, 144, 0.4),
      0 0 16px 4px rgba(0, 157, 144, 0.45);
  }
  50% {
    transform: scale(1.3) translate(40px, 34px);
    box-shadow:
      0 0 0 8px rgba(0, 157, 144, 0),
      0 0 32px 10px rgba(0, 157, 144, 0.6);
  }
}

/* CAPABILITIES */
.capabilities {
  padding-block: 60px;
}

.capabilities__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.capability-card {
  --i: 0;
  display: flex;
  gap: 18px;
  padding: 28px 24px;
  border: 1px solid var(--c-border);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.85s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 70ms + 80ms);
  opacity: 0;
  transform: translateY(28px);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.4s,
    border-color 0.4s;
  cursor: default;
}

.capability-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--c-accent) 60%, var(--c-border));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.capability-card__icon {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 20px;
  border: 1px solid var(--c-border);
  background: var(--c-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.capability-card__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--c-text);
}

.capability-card__desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--c-text-soft);
}

/* FEATURED WORKS (Static 4 cards) */
.featured-works {
  padding-block: 60px;
  position: relative;
}
.featured-works__inner {
  max-width: 1420px;
  margin-inline: auto;
  padding-inline: 24px;
}
.sec-title {
  margin: 0 0 18px;
}

/* Сетка вместо слайдера */
.fw-grid {
  --gap: 28px;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Карточка */
.work-card {
  position: relative;
  display: block;
  aspect-ratio: 4/5;
  border-radius: clamp(16px, 2.6vw, 30px);
  overflow: hidden;
  isolation: isolate;
  background: var(--c-bg-alt, #111);
  border: 1px solid var(--c-border, #222);
  transition:
    transform 0.7s var(--ease-out, cubic-bezier(0.16, 0.84, 0.44, 1)),
    border-color 0.5s,
    box-shadow 0.55s;
  animation: fadeUp 0.8s var(--ease-out, cubic-bezier(0.16, 0.84, 0.44, 1)) both;
}

.work-card:nth-child(1) {
  animation-delay: 0.05s;
}
.work-card:nth-child(2) {
  animation-delay: 0.15s;
}
.work-card:nth-child(3) {
  animation-delay: 0.25s;
}
.work-card:nth-child(4) {
  animation-delay: 0.35s;
}

.work-card figure {
  margin: 0;
  inset: 0;
  position: absolute;
  background: linear-gradient(120deg, #b5f0ff, #d6f6ec);
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(108%) contrast(1.05);
  transform: scale(1.04);
  transition: transform 1.2s var(--ease-out, cubic-bezier(0.16, 0.84, 0.44, 1));
  pointer-events: none;
  user-select: none;
}
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
  opacity: 0.92;
  transition: opacity 0.7s;
  mix-blend-mode: normal;
}

.work-card:hover {
  transform: translateY(-12px) rotate(-1deg);
  border-color: color-mix(
    in srgb,
    var(--c-accent, #4ab6ff) 55%,
    var(--c-border, #222)
  );
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45);
}
.work-card:hover img {
  transform: scale(1.12);
}
.work-card:hover::before {
  opacity: 0.75;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* HIGHLIGHTS */
.highlights {
  background: linear-gradient(
    180deg,
    var(--c-bg) 0%,
    var(--c-bg-alt) 62%,
    var(--c-bg) 100%
  );
  position: relative;
}
.highlight-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.highlight {
  position: relative;
  padding: 26px 22px 28px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    transform 0.65s var(--ease-out),
    border-color 0.5s,
    box-shadow 0.55s;
  animation: fadeUp 0.9s var(--ease-out) both;
}
.highlight:nth-child(1) {
  animation-delay: 0.05s;
}
.highlight:nth-child(2) {
  animation-delay: 0.15s;
}
.highlight:nth-child(3) {
  animation-delay: 0.25s;
}
.highlight:nth-child(4) {
  animation-delay: 0.35s;
}
.highlight::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 76% 20%,
    rgba(0, 157, 144, 0.18),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
}
.highlight:hover {
  transform: translateY(-10px);
  border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-border));
  box-shadow: var(--shadow-lg);
}
.highlight:hover::after {
  opacity: 1;
}
.highlight__head {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.6;
}
.highlight__value {
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 700;
  letter-spacing: -1px;
  background: linear-gradient(110deg, var(--c-text) 0%, var(--c-accent) 100%);
  -webkit-background-clip: text;
  color: transparent;
  line-height: 1;
}
.highlight__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--c-text-soft);
}
.highlight__link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  text-decoration: none;
  position: relative;
}
.highlight__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: transform 0.55s;
  opacity: 0.45;
}
.highlight__link:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

/* PAINS */

.pains-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.pain-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 26px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 26px;
  transition:
    transform 0.6s var(--ease-out),
    border-color 0.5s,
    box-shadow 0.55s;
  animation: fadeUp 0.85s var(--ease-out) both;
  opacity: 0;
  transform: translateY(28px);
}
.pain-card:nth-child(1) {
  animation-delay: 0.05s;
}
.pain-card:nth-child(2) {
  animation-delay: 0.12s;
}
.pain-card:nth-child(3) {
  animation-delay: 0.19s;
}
.pain-card:nth-child(4) {
  animation-delay: 0.26s;
}
.pain-card:nth-child(5) {
  animation-delay: 0.33s;
}
.pain-card:nth-child(6) {
  animation-delay: 0.4s;
}
.pain-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 72% 22%,
    rgba(0, 157, 144, 0.18),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.55s;
}
.pain-card:hover {
  transform: translateY(-12px);
  border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-border));
  box-shadow: var(--shadow-lg);
}
.pain-card:hover::before {
  opacity: 1;
}
.pain-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.pain-card__icon span {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 700;
}
.pain-card__title {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.pain-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--c-text-soft);
}
.pain-card__solution {
  margin: auto 0 0;
  font-size: 13px;
  line-height: 1.45;
  background: var(--c-bg-alt);
  border: 1px dashed var(--c-border);
  padding: 10px 12px;
  border-radius: 18px;
  transition:
    background 0.4s,
    border-color 0.4s;
}
.pain-card:hover .pain-card__solution {
  background: color-mix(in srgb, var(--c-bg-alt) 80%, var(--c-accent));
  border-color: color-mix(in srgb, var(--c-accent) 60%, var(--c-border));
}

/* Стили для новой кнопки-ссылки в карточке */
.pain-card__link {
  display: block; /* Растягиваем на всю ширину */
  margin-top: 20px;
  padding: 12px 18px;
  background: var(--c-accent);
  color: #fff; /* Или var(--c-bg), если фон тёмный */
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition:
    transform 0.4s var(--ease-out),
    background-color 0.4s,
    box-shadow 0.4s;
}

.pain-card__link:hover {
  transform: translateY(-3px);
  background: color-mix(
    in srgb,
    var(--c-accent) 88%,
    #000
  ); /* Делаем акцентный цвет чуть темнее при наведении */
  box-shadow: 0 6px 16px rgba(0, 157, 144, 0.25); /* Тень в цвет акцента */
}

/* Улучшение: при наведении на всю карточку, кнопка тоже будет реагировать */
.pain-card:hover .pain-card__link {
  background: color-mix(in srgb, var(--c-accent) 92%, #000);
  transform: translateY(-2px);
}

/* PROCESS (static horizontal row) */
.process {
  --step-size: 280px;
  overflow: hidden;
}
.process-track {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.process-step {
  flex: 1 1 240px;
  min-width: 240px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 24px;
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  animation: fadeUp 0.85s var(--ease-out) both;
  opacity: 0;
  transform: translateY(28px);
  transition:
    transform 0.6s var(--ease-out),
    border-color 0.5s,
    box-shadow 0.55s;
}
.process-step:nth-child(1) {
  animation-delay: 0.05s;
}
.process-step:nth-child(2) {
  animation-delay: 0.13s;
}
.process-step:nth-child(3) {
  animation-delay: 0.21s;
}
.process-step:nth-child(4) {
  animation-delay: 0.29s;
}
.process-step:nth-child(5) {
  animation-delay: 0.37s;
}
.process-step:nth-child(6) {
  animation-delay: 0.45s;
}
.process-step__index {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--grad-accent);
  color: var(--c-accent-fg);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.35);
}
.process-step h3 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 600;
}
.process-step p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--c-text-soft);
}
.process-step:hover {
  transform: translateY(-10px);
  border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-border));
  box-shadow: var(--shadow-lg);
}

/* MODELS */
.models {
  position: relative;
}
.model-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.model-card {
  position: relative;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 30px;
  padding: 28px 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp 0.85s var(--ease-out) both;
  opacity: 0;
  transform: translateY(28px);
  transition:
    transform 0.6s var(--ease-out),
    border-color 0.5s,
    box-shadow 0.55s;
}
.model-card:nth-child(1) {
  animation-delay: 0.05s;
}
.model-card:nth-child(2) {
  animation-delay: 0.15s;
}
.model-card:nth-child(3) {
  animation-delay: 0.25s;
}
.model-card:nth-child(4) {
  animation-delay: 0.35s;
}
.model-card--accent {
  background: linear-gradient(145deg, var(--c-bg) 0%, var(--c-bg-alt) 100%);
  border-color: color-mix(in srgb, var(--c-accent) 45%, var(--c-border));
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.38);
}
.model-card__badge {
  position: absolute;
  top: -14px;
  background: var(--grad-accent);
  color: var(--c-accent-fg);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 12px 7px;
  border-radius: 24px;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.4);
}
.model-card__top h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
}
.model-card__top p {
  margin: 0;
  font-size: 14px;
  color: var(--c-text-soft);
}
.model-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.45;
}
.model-card__list li {
  padding-left: 18px;
  position: relative;
}
.model-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: 0.55;
}
.model-card__cta {
  margin-top: auto;
}
.btn--sm {
  height: 40px;
  padding-inline: 20px;
  font-size: 13px;
}
.model-card:hover {
  transform: translateY(-12px);
  border-color: color-mix(in srgb, var(--c-accent) 60%, var(--c-border));
  box-shadow: var(--shadow-lg);
}

/* AI LAB */
.ai-lab {
  background: var(--c-bg); /* Или var(--c-bg-alt) для контраста */
}

.ai-lab-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, 1fr);
  /* Задаем высоту строк, чтобы карточки красиво вписывались */
  grid-auto-rows: 280px;
}

.ai-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease-out);
}

.ai-card:hover {
  box-shadow: var(--shadow-xl);
}

/* Модификаторы для управления размером карточек */
.ai-card--large-h {
  grid-column: span 2;
}
.ai-card--large-v {
  grid-row: span 2;
}

.ai-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.ai-card:hover img {
  transform: scale(1.05);
}

.ai-card__overlay {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  text-decoration: none;
}

.ai-card:hover .ai-card__overlay {
  opacity: 1;
}

.ai-card__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  transform: translateY(10px);
  transition: transform 0.5s var(--ease-out) 0.1s;
}

.ai-card__desc {
  margin: 0;
  font-size: 14px;
  color: #fff;
  opacity: 0.8;
  transform: translateY(10px);
  transition: transform 0.5s var(--ease-out) 0.15s;
}

.ai-card:hover .ai-card__title,
.ai-card:hover .ai-card__desc {
  transform: translateY(0);
}

/* Адаптивность сетки */
@media (max-width: 992px) {
  .ai-lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* На планшете все карточки становятся обычными */
  .ai-card--large-h,
  .ai-card--large-v {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 576px) {
  .ai-lab-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 320px; /* Делаем карточки повыше на мобильных */
  }
}

/* TESTIMONIAL */
.testimonials {
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.testimonials-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 24px;
  padding: 24px;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.testimonial-card__body {
  flex-grow: 1;
}

.testimonial-card__body blockquote {
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text-soft);
  quotes: "«" "»";
}

.testimonial-card__footer {
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding-bottom: 12px;
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-card__author cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text);
}

.testimonial-card__author span {
  font-size: 13px;
  color: var(--c-text-soft);
}

.testimonial-card__proof-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  text-decoration: none;
  white-space: nowrap;
}
.testimonial-card__proof-link:hover {
  text-decoration: underline;
}

.testimonials-disclaimer {
  text-align: center;
  margin-top: 40px;
  font-size: 13px;
  color: var(--c-text-soft);
  opacity: 0.8;
}

/* LIGHTBOX FOR SCREENSHOTS */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}

.lightbox-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 30, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: fadeUp 0.4s var(--ease-out) both;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  background: var(--c-bg);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: all 0.3s;
}

.lightbox-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: var(--c-accent);
  color: #fff;
}

/* STACK REIMAGINED (REVISED) */
.stack-reimagined {
  background: var(--c-bg-alt);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--c-border);
}

.stack-grid {
  display: grid;
  gap: 24px;
  /* Адаптивная сетка, которая сама подберет кол-во колонок */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stack-category {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s;
}

.stack-category:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.stack-category__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.6;
}

.stack-category__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-tech {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border-radius: 12px;
  transition: background-color 0.3s;
}

.stack-tech:hover {
  background: var(--c-bg-alt);
}

.stack-tech__logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Запасной стиль для иконок-букв */
.stack-tech__logo-char {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-soft);
}

.stack-tech__name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--c-text);
}

/* BLOG PREVIEW */

.blog-cards {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.bcard {
  position: relative;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  animation: fadeUp 0.85s var(--ease-out) both;
  opacity: 0;
  transform: translateY(28px);
  transition:
    transform 0.65s var(--ease-out),
    border-color 0.5s,
    box-shadow 0.55s;
}
.bcard:nth-child(1) {
  animation-delay: 0.05s;
}
.bcard:nth-child(2) {
  animation-delay: 0.15s;
}
.bcard:nth-child(3) {
  animation-delay: 0.25s;
}
.bcard__cover {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.bcard__img {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #cdf8ff, #9fd5ff);
  transition:
    transform 1.2s var(--ease-out),
    filter 1.2s;
}

.bcard__img img {
  width: 100%; /* растягиваем по ширине */
  height: 100%; /* растягиваем по высоте родителя */
  object-fit: cover; /* как background-size: cover */
  object-position: center; /* центрируем изображение */
  display: block; /* убираем лишние пробелы вокруг img */
}

.bcard__img--gradient2 {
  background: linear-gradient(120deg, #ffe6b0, #ffc4dd, #d2c4ff);
}
.bcard__img--gradient3 {
  background: linear-gradient(120deg, #c4ffe6, #d4ffd4, #c4f0ff);
}
.bcard__body {
  padding: 24px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.bcard__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 650;
}
.bcard__title a {
  text-decoration: none;
  background: linear-gradient(90deg, var(--c-text) 0%, var(--c-accent) 100%);
  -webkit-background-clip: text;
  color: transparent;
  transition: opacity 0.45s;
}
.bcard__title a:hover {
  opacity: 0.7;
}
.bcard__excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text-soft);
  flex-grow: 1;
}
.bcard__meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  opacity: 0.65;
}
.bcard:hover {
  transform: translateY(-12px);
  border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-border));
  box-shadow: var(--shadow-lg);
}
.bcard:hover .bcard__img {
  transform: scale(1.15) rotate(3deg);
  filter: contrast(1.1) saturate(1.1);
}

.blog-preview__cta {
  margin-top: 42px;
  display: flex;
  justify-content: center;
}

/* FINAL CTA */
.final-cta {
  position: relative;
  background: var(--c-bg);
  padding-block: clamp(110px, 16vh, 220px);
  overflow: hidden;
}
.final-cta__wrap {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 38px;
  animation: fadeUp 0.9s var(--ease-out) both 0.15s;
  opacity: 0;
  transform: translateY(30px);
}
.final-cta__title {
  margin: 0;
  font-size: clamp(36px, 6.8vw, 72px);
  font-weight: 700;
  letter-spacing: -1.4px;
  line-height: 1.02;
  background: linear-gradient(100deg, var(--c-text) 0%, var(--c-accent) 100%);
  -webkit-background-clip: text;
  color: transparent;
}
.final-cta__text {
  margin: 0 auto;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  max-width: 720px;
  color: var(--c-text-soft);
}
.final-cta__actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.final-cta::before,
.final-cta::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle, rgba(0, 157, 144, 0.42), transparent 70%);
  filter: blur(54px);
  opacity: 0.32;
  animation: orb 22s linear infinite;
  pointer-events: none;
}
.final-cta::after {
  width: 820px;
  height: 820px;
  animation-duration: 30s;
  animation-direction: reverse;
  opacity: 0.25;
}

/* RESPONSIVE REFINEMENTS */
@media (max-width: 1020px) {
  .newsletter-box {
    grid-template-columns: 1fr;
  }
  .newsletter-box__meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }
  .nl-stat {
    flex: 1 1 140px;
  }
}
@media (max-width: 860px) {
  .hero {
    padding-top: 0;
  }
  .hero__title {
    font-size: 30px;
  }
  .hero__visual {
    min-height: 200px;
    order: -1;
  }
  .hero-grid__layer {
    border-radius: 20px;
  }

  .capabilities {
    padding-block: 30px;
  }
  .capabilities__grid {
    gap: 16px;
  }
  .fw-track {
    gap: 22px;
  }
  .fw-slide {
    flex: 0 0 clamp(240px, 60vw, 320px);
  }
  .newsletter-box {
    padding: 44px 34px;
  }
  .btn--lg {
    height: 50px;
    font-size: 14px;
    padding-inline: 18px;
  }
}
@media (max-width: 620px) {
  .capability-card {
    padding: 16px 16px 20px;
  }
  .capability-card__icon {
    flex: 0 0 50px;
    height: 50px;
  }
  .highlight-grid {
    gap: 22px;
  }
  .pain-card {
    padding: 18px 18px 22px;
    border-radius: 22px;
  }
  .process-step {
    flex: 1 1 100%;
  }
  .model-card {
    padding: 24px 24px 30px;
    border-radius: 26px;
  }
  .bcard {
    border-radius: 26px;
  }
  .newsletter-box {
    border-radius: 38px;
  }
  .final-cta__title {
    font-size: clamp(34px, 9vw, 64px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-seq] > * {
    animation-delay: 0s !important;
  }
}

/* End of main sections */

[data-i18n] {
  transition: opacity 0.3s;
}
[data-i18n].lang-fade {
  opacity: 0;
  pointer-events: none;
}
