@font-face {
  font-family: 'JetBrains Mono';
  src: url("../assets/fonts/jetbrains-mono.woff2") format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

/* Rubik — единый шрифт бренда (брендбук, раздел 03): пять начертаний 300–700. */
@font-face {
  font-family: 'Rubik';
  src: url("../assets/fonts/rubik-cyrillic.woff2") format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Rubik';
  src: url("../assets/fonts/rubik-latin.woff2") format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }
/* Без scroll-behavior:smooth: якорные ссылки на #layer-office/tools/models/access
   (карточки sticky-стека .story делят один containing block с сильно
   перекрывающимися sticky-диапазонами) — при smooth-скролле Chrome промахивался
   мимо цели на 900–1200px (проверено: с "auto" #layer-tools приземляется на
   scrollY≈3420, с "smooth" — на ≈4380, уже за пределами своей карточки). */
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font); font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-weight: 600; line-height: 1.15; }
h2 { line-height: 1.2; }
h3 { line-height: 1.33; }
p { text-wrap: pretty; }

:root {
  --section-y: clamp(4rem, 7vw, 6rem);
  --fs-hero: clamp(2.5rem, 1.6rem + 2.4vw, 3.5rem); /* Display 56/64 */
  --fs-h2: clamp(1.75rem, 1.4rem + 1vw, 2.5rem); /* H1 40/48 */
  --fs-h3: 1.5rem; /* H3 24/32 */
  --fs-lead: 1.125rem; /* Body L 18/28 */

  /* Трио слоёв платформы — семейство синих (все три оттенка ~200-210°)
     оказалось неразличимо на глаз что в hero-диаграмме (3 грани ромба видны
     ОДНОВРЕМЕННО, им нужен разный тон, не только светлота), что в sticky-
     стеке рядом с синим --brand. Вернулись к трём РАЗНЫМ тонам — как в
     реальном референсе kestra (Stacked.DKtV15np.css: card2 золото #e6c359,
     card3 синий #59bce6, card4 зелёный #59e659) — но их значения светлые
     (рассчитаны под тёмную карточку на их сайте), поэтому пересчитаны под
     контраст на БЕЛОМ фоне с тем же самым тоном: office — золото/янтарь
     (43°, было бы мутно-коричневым на 52-60°, ушли левее по кругу), tools —
     синий (208°, тот самый исторический #0e6abb этого проекта), models —
     зелёный (140°, тоже уже проверенный #157a37). WCAG на белом: office
     5.4:1, tools 5.5:1, models 5.4:1. */
  --layer-office: #8e620b;
  --layer-tools:  #0e6abb;
  --layer-models: #157a37;
}

.container { width: min(1200px, 92vw); max-width: 100%; margin-inline: auto; min-width: 0; }
html, body { overflow-x: clip; }
[id] { scroll-margin-top: 5rem; }
section { padding-block: var(--section-y); }
section h2 { font-size: var(--fs-h2); text-align: center; margin: 0 0 var(--sp-4); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6) var(--sp-10);
  border-radius: var(--r-md);
  font-family: inherit;
  font-weight: 500;
  font-size: var(--fs-base);
  border: var(--bw-thin) solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: var(--focus-ring-width) solid var(--brand);
  outline-offset: var(--focus-ring-offset);
}

.btn:active { transform: scale(0.96); }
.btn--primary { background: var(--brand); color: var(--neutral-0); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn--ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-8);
  z-index: 100;
  padding: var(--sp-6) var(--sp-10);
  background: var(--brand);
  color: var(--neutral-0);
  border-radius: var(--r-md);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-8); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsla(0, 0%, 100%, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: var(--bw-thin) solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: var(--sp-10); padding-block: var(--sp-6); }
.brand { display: flex; align-items: center; gap: var(--sp-6); color: var(--text); }
.brand__name { font-family: var(--font); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: var(--sp-2); margin-inline-start: auto; }
.site-nav a {
  display: flex;
  align-items: center;
  padding: var(--sp-5) var(--sp-8);
  border-radius: var(--r-sm);
  font-size: var(--fs-base);
  font-weight: 400;
  color: var(--text);
  transition: background-color var(--dur) var(--ease);
}
.site-nav a:hover { background: var(--surface-2); }
.site-header__cta { margin-inline-start: var(--sp-8); }
.burger { font-family: inherit; display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: var(--sp-4); cursor: pointer; }
.burger span { width: 20px; height: 2px; background: var(--text); }

@media (max-width: 768px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: var(--bw-thin) solid var(--border);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height var(--dur) var(--ease), visibility var(--dur);
  }
  .site-nav.is-open { max-height: 420px; visibility: visible; }
  .site-nav a { min-height: 48px; }
  .site-nav a { padding: var(--sp-8) var(--sp-10); border-top: var(--bw-thin) solid var(--border); }
  .site-header__cta { display: none; }
  .burger { display: flex; }
}

/* Footer */
.site-footer { background: var(--surface); border-top: var(--bw-thin) solid var(--border); padding-block: var(--sp-12); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-10) var(--sp-12);
}
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-5); }
.site-footer__brand p { color: var(--text-2); font-size: var(--fs-sm); margin: 0; max-width: 34ch; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-top: var(--sp-12);
  padding-top: var(--sp-10);
  border-top: var(--bw-thin) solid var(--border);
}
.site-footer__bottom p { color: var(--text-3); font-size: var(--fs-sm); margin: 0; }

/* Hero */
.hero {
  background: var(--bg);
  color: var(--text);
  padding-block: 2rem clamp(3rem, 6vw, 5rem);
  overflow: visible;
}
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); align-items: center; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.12; margin: 0 0 var(--sp-8); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.hero__lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); margin: 0 0 var(--sp-10); max-width: 44ch; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: 730px; margin: 0 0 var(--sp-12); }
.hero__tags span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.75rem;
  border: var(--bw-thin) solid var(--border);
  border-radius: var(--r-full);
  color: var(--text-3);
}
.hero__tags svg { width: 18px; height: 18px; color: var(--brand); flex-shrink: 0; }

/* Градиентная рамка через padding-box/border-box — как .btn-primary у kestra */
.btn--gradient {
  border: var(--bw-thin) solid transparent;
  background: linear-gradient(var(--brand), var(--brand)) padding-box,
              linear-gradient(262.72deg, #fff 15.19%, var(--accent) 37.92%, var(--brand-dark) 76.01%) border-box;
  box-shadow: 0 6px 20px -4px color-mix(in srgb, var(--brand) 45%, transparent);
}
.btn--gradient:hover { box-shadow: 0 10px 26px -4px color-mix(in srgb, var(--brand) 55%, transparent); }

.hero__cta { display: flex; gap: var(--sp-8); flex-wrap: wrap; }

.hero-stack { position: relative; }
.hero-stack__art { width: 86%; margin-inline: auto; height: auto; display: block; overflow: visible; position: relative; z-index: 1; }

.hero-stack__glow { filter: blur(2px); }
.hero-stack__particles circle { fill: #ffffff; filter: drop-shadow(0 0 3px rgba(31, 134, 230, 0.9)); }
.hero-stack__layer.is-pending .hero-stack__particles { opacity: 0; }
.hero-stack__particles { transition: opacity 0.5s ease; }

.hero-stack__label { text-transform: uppercase; font-family: var(--font); }
.hero-stack__layer--models use { color: var(--layer-models); }
.hero-stack__layer--tools use { color: var(--layer-tools); }
.hero-stack__layer--office use { color: var(--layer-office); }

.hero-stack__badge-label { text-transform: uppercase; font-family: var(--font); }
.hero-stack__badge-timer { fill: var(--text-3); font-family: var(--mono); }

.hero-stack__layer--office { filter: drop-shadow(0 10px 22px rgba(201, 138, 12, 0.32)); }
.hero-stack__layer--tools { filter: drop-shadow(0 10px 22px rgba(23, 116, 198, 0.32)); }
.hero-stack__layer--models { filter: drop-shadow(0 10px 22px rgba(28, 148, 70, 0.32)); }
.hero-stack__layer--llm { filter: drop-shadow(0 10px 22px rgba(139, 92, 246, 0.32)); }

.hero-stack__layer.is-done { filter: drop-shadow(0 0 14px var(--glow)) drop-shadow(0 10px 22px hsla(0, 0%, 0%, 0.12)); }
.hero-stack__layer--office { --glow: rgba(217, 160, 50, 0.6); }
.hero-stack__layer--tools { --glow: rgba(53, 148, 221, 0.6); }
.hero-stack__layer--models { --glow: rgba(56, 180, 98, 0.6); }
.hero-stack__layer--llm { --glow: rgba(139, 92, 246, 0.55); }
.hero-stack__layer { transition: filter 0.7s ease; }

.hero-stack__layer--models .hero-stack__float { animation: hero-float 4s ease-in-out infinite; }
.hero-stack__layer--tools .hero-stack__float { animation: hero-float 4s ease-in-out 0.8s infinite; }
.hero-stack__layer--office .hero-stack__float { animation: hero-float 4s ease-in-out 1.6s infinite; }
.hero-stack__layer--llm .hero-stack__float { animation: hero-float 4s ease-in-out 2.4s infinite; }

.hero-stack__edge-glow { opacity: 1; stroke-width: 3.2; stroke-dasharray: 150 1150; animation: hero-edge-sheen 3.2s linear infinite; }
.hero-stack__layer--models .hero-stack__edge-glow { animation-delay: 0s; }
.hero-stack__layer--tools .hero-stack__edge-glow { animation-delay: 0.4s; }
.hero-stack__layer--office .hero-stack__edge-glow { animation-delay: 0.8s; }
.hero-stack__layer--llm .hero-stack__edge-glow { animation-delay: 1.2s; stroke: #a78bfa; }
.hero-stack__layer.is-building .hero-stack__edge-glow { animation-duration: 1.4s; }

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes hero-edge-sheen {
  to { stroke-dashoffset: -1300; }
}

/* Build sequence — mirrors kestra.io's hero animation cadence */
.hero-stack__ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  height: 130%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(31, 134, 230, 0.36) 0%, rgba(31, 134, 230, 0.16) 30%, rgba(31, 134, 230, 0.05) 60%, transparent 75%);
  filter: blur(20px);
  animation: hero-bg-glow-pulse 3.5s ease-in-out infinite;
}
@keyframes hero-bg-glow-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.hero-stack__icon { transition: opacity 0.5s ease, filter 0.5s ease; }
.hero-stack__layer.is-pending .hero-stack__icon,
.hero-stack__layer.is-building .hero-stack__icon { opacity: 0.45; }
.hero-stack__layer.is-building .hero-stack__icon.is-lit,
.hero-stack__layer.is-done .hero-stack__icon { opacity: 0.9; }

.hero-stack__badge { transition: opacity 0.5s ease; }
.hero-stack__layer.is-pending .hero-stack__badge,
.hero-stack__layer.is-building .hero-stack__badge { opacity: 0; }

/* Поток токенов в луче: поток вниз — тёмно-синий, вверх — бирюзовый (контраст на светло-голубом луче), соседние токены чуть разного оттенка. Сдвиг задаёт SMIL в scripts/main.js. */
.hero-stack__matrix text { font: 600 15px var(--mono); white-space: pre; opacity: 0.85; }
.hero-stack__stream--down text { fill: #0a3f7e; }
.hero-stack__stream--up text { fill: #05706a; }
.hero-stack__stream--down .is-alt { fill: #0a74da; }
.hero-stack__stream--up .is-alt { fill: #08a595; }

/* Плита «Модели»: блоки по очереди «выбираются» — подсвечивается блок */
.hero-stack__lit { animation: hero-tile-lit 7.2s linear infinite; }
@keyframes hero-tile-lit { 0% { opacity: 0; } 4%, 11% { opacity: 0.35; } 16%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero-stack__float,
  .hero-stack__edge-glow,
  .hero-stack__ambient-glow { animation: none; }
  .hero-stack__lit { animation: none; }
  .hero-stack__particles { display: none; }
  .hero-stack__edge-glow { stroke-dasharray: none; opacity: 0.5; }
}

@media (max-width: 768px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero-stack { margin-top: var(--sp-12); }
}

/* Modules */
.modules { background: var(--surface); }
.section-lead { text-align: center; color: var(--text-2); max-width: 56ch; margin: 0 auto var(--sp-12);  font-size: var(--fs-lead); line-height: 1.55; }

.modules__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-12); }
.module-card { background: var(--bg); border: var(--bw-thin) solid var(--border); border-radius: var(--r-lg); padding: var(--sp-12); }
.module-card__icon { width: 20px; height: 20px; padding: var(--sp-4); box-sizing: content-box; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); margin-bottom: var(--sp-6); display: block; }
.module-card h3 { font-size: 1.25rem; margin: 0 0 var(--sp-3); color: var(--accent-ink); }
.module-card p { font-size: var(--fs-base); line-height: 1.5; color: var(--text-2); margin: 0; }

@media (max-width: 900px) {
  .modules__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .modules__grid { grid-template-columns: 1fr; }
}

/* Showcase — tilted stack of real product screenshots, kestra-style leader lines */
.showcase { position: relative; overflow: hidden; }
.showcase__stage {
  --gap: 64px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: var(--gap);
  align-items: center;
  margin-top: var(--sp-14, 3rem);
}
.showcase__callouts { display: grid; gap: var(--sp-14, 3rem); align-content: center; }
.showcase__callouts--right { text-align: right; }
.showcase__callout { position: relative; }
.showcase__callout strong { display: block; font-size: var(--fs-base); font-weight: 500; margin-bottom: var(--sp-2); }
.showcase__callout span { font-size: var(--fs-sm); color: var(--text-2); }

.showcase__callout::before,
.showcase__callout::after { content: ""; position: absolute; top: 0.85em; background: var(--border-2); }
.showcase__callout::before { width: var(--gap); height: 1px; }
.showcase__callout::after { width: 5px; height: 5px; border-radius: 50%; margin-top: -2px; background: var(--accent-ink); }
.showcase__callouts--left .showcase__callout::before { left: 100%; }
.showcase__callouts--left .showcase__callout::after { left: calc(100% + var(--gap) - 3px); }
.showcase__callouts--right .showcase__callout::before { right: 100%; }
.showcase__callouts--right .showcase__callout::after { right: calc(100% + var(--gap) - 3px); }

.showcase__cards { position: relative; height: 700px; }
.showcase__cards.reveal { opacity: 1; transform: none; --stack-offset: -50px; }
.showcase__cards.reveal.is-visible { --stack-offset: -150px; }
.showcase__cards::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse at center, rgba(0, 92, 163, 0.12) 0%, rgba(0, 92, 163, 0.045) 45%, transparent 72%);
  z-index: 0;
}
.showcase__sparks { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.showcase__sparks span {
  position: absolute;
  left: var(--x);
  bottom: -24px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  filter: blur(2px);
  animation: showcase-rise var(--t) linear var(--d) infinite;
  animation-play-state: paused;
}
.showcase__cards.is-visible .showcase__sparks span { animation-play-state: running; }
@keyframes showcase-rise {
  0%       { transform: translateY(0); opacity: 0; }
  18%, 82% { opacity: 0.28; }
  100%     { transform: translateY(-560px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase__sparks { display: none; }
}

.showcase__card { aspect-ratio: 16 / 10; height: auto;
  position: absolute;
  top: 30%;
  left: 52%;
  z-index: 1;
  width: 438px;
  transform: translateX(-50%) translateY(calc(var(--i) * var(--stack-offset, -50px))) scaleY(0.7) skew(20deg) rotate(-9deg);
  transition: transform 0.4s var(--ease);
  border-radius: var(--r-lg);
  box-shadow: -3px 4px 0 0 var(--border-2), -15px 20px 40px color-mix(in srgb, var(--brand) 30%, transparent);
  border: var(--bw-thin) solid var(--border);
  border-radius: 1rem;
  background: var(--bg);
}
.showcase__card--mid { z-index: 2; }
.showcase__card--front { z-index: 3; object-fit: cover; object-position: left top; } /* скрин ≈16:10, cover срезает остаток */

.showcase__note { text-align: center; color: var(--text-3); font-size: var(--fs-sm); margin: var(--sp-12) 0 0; }

@media (max-width: 900px) {
  .showcase__stage { grid-template-columns: 1fr; }
  .showcase__callout::before, .showcase__callout::after { display: none; }
  .showcase__cards { height: auto; }
  .showcase__cards::before { display: none; }
  .showcase__card { position: static; width: 100%; transform: none; margin-bottom: var(--sp-8); display: block; }
  .showcase__callouts--right { text-align: left; }
}

/* Use cases */
.use-cases { padding-bottom: var(--sp-12); }

.story__panel--access .access__form {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
/* Поля проявляются со ступенчатой задержкой, когда карточка входит в вьюпорт.
   Наблюдатель — тот же IntersectionObserver, что и у .reveal. */
.access__form.reveal { opacity: 1; transform: none; }
.access__form.reveal > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.access__form.reveal.is-visible > * { opacity: 1; transform: none; }
.access__form.reveal > *:nth-child(2) { transition-delay: 70ms; }
.access__form.reveal > *:nth-child(3) { transition-delay: 140ms; }
.access__form.reveal > *:nth-child(4) { transition-delay: 210ms; }
.access__form.reveal > *:nth-child(5) { transition-delay: 280ms; }

/* Story — sticky-стек. Механика 1:1 из section.stacked / .stacked-card
   (Stacked.DKtV15np.css у kestra): карточки position:sticky со ступенчатым top
   (8.75 / 15 / 21.25 / 27.5rem), возрастающим z-index и отрицательным margin-top —
   за счёт этого они наезжают друг на друга стопкой при скролле страницы.
   Цветная полоса сверху — inset-тень, но карточка светлая (наша палитра), не
   тёмная, как в источнике — так просил пользователь. */
.use-cases { padding-bottom: var(--section-y); }

.story__panel {
  position: sticky;
  max-width: 1400px;
  min-height: 400px;
  margin-inline: auto;
  padding: 5rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 3px 0 0 var(--panel-color) inset, 0 10px 30px 0 hsla(222, 30%, 10%, 0.14);
}
.story__panel--office { --panel-color: var(--layer-office); }
.story__panel--tools  { --panel-color: var(--layer-tools); }
.story__panel--models { --panel-color: var(--layer-models); }

.story__panel--office { z-index: 1; top: 8.75rem; margin-bottom: 200px; }
.story__panel--tools  { z-index: 2; top: 15rem; margin-top: -6.25rem; margin-bottom: 6.25rem; }
.story__panel--models { z-index: 3; top: 21.25rem; margin-bottom: 6.25rem; }
.story__panel--access { z-index: 4; top: 27.5rem; --panel-color: var(--brand); }

.story__badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 1.125rem;
  border: var(--bw-thin) solid color-mix(in srgb, var(--panel-color) 25%, transparent);
  border-radius: 2.5rem;
  background: color-mix(in srgb, var(--panel-color) 8%, var(--bg));
  color: var(--panel-color);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.story__badge svg { width: 1rem; height: 1rem; }

.story__content { display: flex; flex-direction: column; justify-content: center; gap: var(--sp-12); width: 100%; }
.story__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.25; margin: 0; color: var(--text); }
.story__title em { font-style: normal; color: inherit; }
.story__text { color: var(--text-2); font-size: var(--fs-lead); line-height: 1.55; margin: 0; max-width: 60ch; }

.story__caps { display: flex; flex-direction: column; gap: 1rem; }
.story__cap {
  min-height: 6.25rem;
  padding: 1rem 1.5rem;
  border: var(--bw-thin) solid var(--border);
  border-radius: 0.625rem;
  background: var(--surface);
  box-shadow: var(--sh-sm);
}
.story__cap strong { display: block; font-size: var(--fs-base); font-weight: 500; color: var(--text); margin-bottom: var(--sp-2); }

/* Сцены в карточках слоёв: статичный кадр по умолчанию, движение — только без prefers-reduced-motion */
.story__art { display: block; width: 100%; height: auto; margin-bottom: var(--sp-6); color: var(--panel-color); overflow: visible; }
.story__art text { font-family: var(--mono); }
.sa-card { fill: var(--bg); stroke: var(--border); }
.sa-soft { fill: currentColor; fill-opacity: 0.1; }
.sa-ink { fill: currentColor; }
.sa-cell, .sa-track, .sa-av-bg { fill: var(--surface-2); }
.sa-label { font-size: 9px; fill: var(--text-2); }
.sa-term { fill: hsl(222, 47%, 11%); }
.sa-label--term { fill: hsl(215, 20%, 65%); }
.sa-type, .sa-caret { font-size: 9.5px; fill: hsl(213, 27%, 84%); }
.sa-type--ok { fill: hsl(142, 69%, 58%); }
.sa-chip rect { fill: color-mix(in srgb, currentColor 10%, var(--bg)); stroke: color-mix(in srgb, currentColor 30%, transparent); }
.sa-chip text { font-size: 10px; fill: currentColor; text-anchor: middle; }
.sa-count { font-size: 12px; font-weight: 700; fill: #fff; text-anchor: middle; }
.sa-count--sm { font-size: 11px; }
.sa-b-ring { fill: var(--bg); stroke: currentColor; stroke-width: 2; }
.sa-b-dot { fill: currentColor; }
.sa-av-fg { fill: var(--border-2); }
.sa-e-ring { fill: none; stroke: currentColor; stroke-width: 2; opacity: 0; }
.sa-axis { fill: none; stroke: var(--border-2); stroke-width: 1.5; }
.sa-grid { stroke: var(--border); stroke-dasharray: 3 4; }
.sa-f-curve { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.sa-wire { fill: none; stroke: var(--border-2); stroke-width: 1.5; stroke-dasharray: 3 4; }
.sa-r-hub { fill: color-mix(in srgb, currentColor 12%, var(--bg)); stroke: currentColor; stroke-width: 1.5; }
.sa-r-model rect { fill: var(--bg); stroke: var(--border); }
.sa-r-model text { font-size: 10px; fill: var(--text); }
.sa-r-pkt { fill: currentColor; transform: translate(128px, 55px); }
.sa-marquee, .sa-b-fill, .sa-b-lvl, .sa-e-av, .sa-a1-meet, .sa-a1-tick { transform-box: fill-box; }
@media (prefers-reduced-motion: no-preference) {
  /* Ассистент: встреча садится в календарь, терминал печатает задачи */
  .sa-a1-meet { animation: sa-meet 6s infinite; }
  .sa-a1-tick { animation: sa-tick 6s infinite; transform-origin: center; }
  .sa-type { animation: sa-type 6s calc(var(--d) * 0.9s) infinite both; }
  .sa-caret { animation: sa-blink 1s steps(1) infinite; }
  /* Обучение: прогресс по шагам, узлы и уровень загораются по мере прохода */
  .sa-b-fill { transform-origin: 0 50%; animation: sa-fill 6s infinite; }
  .sa-b-node .sa-b-dot { animation: sa-node-dot 6s infinite; }
  .sa-b-node .sa-b-ring { animation: sa-node-ring 6s infinite; }
  .sa-b-node--1 .sa-b-dot { animation-name: sa-node-dot1; }
  .sa-b-node--1 .sa-b-ring { animation-name: sa-node-ring1; }
  .sa-b-node--2 .sa-b-dot { animation-name: sa-node-dot2; }
  .sa-b-node--2 .sa-b-ring { animation-name: sa-node-ring2; }
  .sa-b-lvl { transform-origin: 50% 100%; animation: sa-lvl 6s calc(var(--d) * 0.35s) infinite; }
  /* Навыки: ленты едут навстречу друг другу */
  .sa-marquee { animation: sa-marquee var(--t) linear infinite; }
  .sa-marquee--r { animation-direction: reverse; }
  /* Эксперты: по очереди выходят вперёд */
  .sa-e-av { transform-origin: center; animation: sa-e-av 7.5s calc(var(--d) * 1.5s) infinite; }
  .sa-e-ring { animation: sa-e-ring 7.5s calc(var(--d) * 1.5s) infinite; }
  .sa-e-role { animation: sa-e-role 7.5s calc(var(--d) * 1.5s) infinite; }
  /* Обучение модели: кривая loss рисуется, методы подсвечиваются по очереди */
  .sa-f-curve { stroke-dasharray: 100; animation: sa-curve 6s infinite; }
  .sa-f-chip rect { animation: sa-chip-bg 6s calc(var(--d) * 2s) infinite; }
  .sa-f-chip text { animation: sa-chip-txt 6s calc(var(--d) * 2s) infinite; }
  /* Маршрутизация: запросы идут через роутер к разным моделям */
  .sa-r-pkt { opacity: 0; animation: 4.5s infinite; }
  .sa-r-pkt--0 { animation-name: sa-pkt0; }
  .sa-r-pkt--1 { animation-name: sa-pkt1; animation-delay: 1.5s; }
  .sa-r-pkt--2 { animation-name: sa-pkt2; animation-delay: 3s; }
  .sa-r-model rect { animation: sa-model 4.5s calc(var(--d) * 1.5s) infinite; }
}
@keyframes sa-meet { 0% { transform: translate(60px, -40px); opacity: 0; } 12% { opacity: 1; } 30%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes sa-tick { 0%, 30% { opacity: 0; transform: scale(0.4); } 38%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes sa-type { 0% { clip-path: inset(0 100% 0 0); } 12%, 75% { clip-path: inset(0 0 0 0); } 85%, 100% { clip-path: inset(0 100% 0 0); } }
@keyframes sa-blink { 50% { opacity: 0; } }
@keyframes sa-fill { 0% { transform: scaleX(0); } 70%, 90% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes sa-node-dot { 0% { fill: var(--border-2); } 3%, 90% { fill: currentColor; } 100% { fill: var(--border-2); } }
@keyframes sa-node-ring { 0% { stroke: var(--border-2); } 3%, 90% { stroke: currentColor; } 100% { stroke: var(--border-2); } }
@keyframes sa-node-dot1 { 0%, 34% { fill: var(--border-2); } 37%, 90% { fill: currentColor; } 100% { fill: var(--border-2); } }
@keyframes sa-node-ring1 { 0%, 34% { stroke: var(--border-2); } 37%, 90% { stroke: currentColor; } 100% { stroke: var(--border-2); } }
@keyframes sa-node-dot2 { 0%, 68% { fill: var(--border-2); } 71%, 90% { fill: currentColor; } 100% { fill: var(--border-2); } }
@keyframes sa-node-ring2 { 0%, 68% { stroke: var(--border-2); } 71%, 90% { stroke: currentColor; } 100% { stroke: var(--border-2); } }
@keyframes sa-lvl { 0%, 20% { transform: scaleY(0.15); } 60%, 90% { transform: none; } 100% { transform: scaleY(0.15); } }
@keyframes sa-marquee { to { transform: translateX(calc(-1 * var(--w))); } }
@keyframes sa-e-av { 0%, 22%, 100% { transform: none; } 5%, 17% { transform: scale(1.12); } }
@keyframes sa-e-ring { 0%, 22%, 100% { opacity: 0; } 5%, 17% { opacity: 1; } }
@keyframes sa-e-role { 0%, 22%, 100% { fill: var(--text-2); } 5%, 17% { fill: currentColor; } }
@keyframes sa-curve { 0% { stroke-dashoffset: 100; } 60%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } }
@keyframes sa-chip-bg { 0%, 36%, 100% { fill: color-mix(in srgb, currentColor 10%, var(--bg)); } 4%, 30% { fill: currentColor; } }
@keyframes sa-chip-txt { 0%, 36%, 100% { fill: currentColor; } 4%, 30% { fill: #fff; } }
@keyframes sa-pkt0 { 0% { transform: translate(68px, 55px); opacity: 0; } 6% { opacity: 1; } 35% { transform: translate(128px, 55px); } 65% { transform: translate(196px, 18px); opacity: 1; } 72%, 100% { transform: translate(196px, 18px); opacity: 0; } }
@keyframes sa-pkt1 { 0% { transform: translate(68px, 55px); opacity: 0; } 6% { opacity: 1; } 35% { transform: translate(128px, 55px); } 65% { transform: translate(196px, 52px); opacity: 1; } 72%, 100% { transform: translate(196px, 52px); opacity: 0; } }
@keyframes sa-pkt2 { 0% { transform: translate(68px, 55px); opacity: 0; } 6% { opacity: 1; } 35% { transform: translate(128px, 55px); } 65% { transform: translate(196px, 86px); opacity: 1; } 72%, 100% { transform: translate(196px, 86px); opacity: 0; } }
@keyframes sa-model { 0%, 62%, 100% { stroke: var(--border); } 66%, 90% { stroke: currentColor; } }

.story__link {
  align-self: flex-end;
  width: fit-content;
  padding: 0.5rem 1rem;
  border: var(--bw-thin) solid var(--panel-color);
  border-radius: 0.5rem;
  color: var(--panel-color);
  font-size: 0.875rem;
}
.story__link:hover { background: var(--surface); }

@media (max-width: 575px) {
  .story__panel { position: static; margin-top: 0; margin-bottom: var(--sp-12); }
}
@media (min-width: 769px) {
  .story__panel { padding: 5rem 3rem 2.5rem; }
  .story__badge { top: 2.5rem; left: 2.5rem; }
  .story__caps { flex-direction: row; }
  .story__cap { flex: 1 1 0; min-width: 0; }
  .story__caps { max-width: 720px; }
}
@media (min-width: 1200px) {
  .story__panel {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-height: 560px;
    padding: 0 4rem 0 6.875rem;
  }
  .story__content { max-width: 510px; }
  .story__link { position: absolute; bottom: 2.5rem; right: 2.5rem; align-self: auto; }
}
/* Рядом с текстом две карточки в ряд сжимают сцены до ~220px — мелко; до 1400px ставим их в колонку */
@media (min-width: 1200px) and (max-width: 1399px) {
  .story__caps { flex-direction: column; width: 320px; flex-shrink: 0; }
}

/* Access form */
.access__form {
  margin-top: var(--sp-12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  background: var(--bg);
  border: var(--bw-thin) solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-12);
  box-shadow: var(--sh-md);
}
/* Поля по анатомии BlzInput / BlzTextarea из дизайн-системы:
   подпись → контрол 40px → подсказка/ошибка; звёздочка по required; радиус 10px;
   фокус — акцентная граница + мягкое кольцо; ошибка — danger. */
.blz-field { display: flex; flex-direction: column; gap: 0.5rem; }
.blz-field__label { font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
.blz-field:has(.blz-field__control:required) .blz-field__label::after { content: ' *'; color: var(--danger); }
.blz-field__control {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 0 0.75rem;
  font: inherit;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 40%, transparent);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), outline-color var(--dur) var(--ease);
}
.blz-field__control::placeholder { color: var(--text-3); }
.blz-field__control:hover { border-color: var(--text-3); }
.blz-field__control:focus { border-color: var(--brand); outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.blz-field__control--invalid { border-color: var(--danger); }
.blz-field__control--invalid:focus { border-color: var(--danger); outline-color: var(--danger-bg); }
.blz-textarea__control { padding: 0.75rem; min-height: 88px; resize: vertical; }
.blz-field__hint { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.blz-field__error { margin: 0; font-size: var(--fs-sm); color: var(--danger); }
.access__form-full { grid-column: 1 / -1; }
.access__form-actions { display: flex; align-items: center; gap: var(--sp-8); flex-wrap: wrap; }
.access__form-actions .btn { min-height: 40px; }
.access__form-status { color: var(--ok); font-size: var(--fs-sm); margin: 0; }

@media (max-width: 768px) {
  .access__form { grid-template-columns: 1fr; }
}


/* Сравнение «как обычно / с Блазаром» — тёмная полоса как у референса */
.compare {
  --cmp-bg: hsl(222, 47%, 7%);
  --cmp-surface: hsl(222, 40%, 10%);
  --cmp-border: hsl(222, 26%, 18%);
  --cmp-text: hsl(210, 40%, 97%);
  --cmp-text-2: hsl(210, 30%, 72%);
  --cmp-text-3: hsl(210, 22%, 50%);
  --cmp-accent: hsl(201, 100%, 67%);
  background: var(--cmp-bg);
  color: var(--cmp-text);
}
.compare h2 { max-width: 28ch; margin-inline: auto; color: var(--cmp-text); }
.compare h2 span { color: var(--cmp-accent); }
.compare__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); margin-top: var(--sp-12); }
.compare__col {
  padding: var(--sp-10) var(--sp-12) var(--sp-12);
  border: 1px solid var(--cmp-border);
  border-radius: var(--r-lg);
  background: var(--cmp-surface);
  display: flex; flex-direction: column;
}
.compare__col--brand {
  border-color: hsl(206, 100%, 32%);
  background: radial-gradient(120% 90% at 50% 0%, hsl(206, 100%, 18%) 0%, var(--cmp-surface) 60%);
  box-shadow: 0 0 0 1px hsla(201, 100%, 67%, 0.15), 0 30px 80px -30px hsla(206, 100%, 50%, 0.55);
}
.compare__art { width: 100%; height: auto; margin-bottom: var(--sp-8); overflow: visible; }
.compare__wire { fill: none; stroke: var(--cmp-text-3); stroke-width: 1.2; stroke-dasharray: 4 6; opacity: 0.55; }
.compare__node > circle { fill: hsl(222, 40%, 14%); stroke: hsl(222, 26%, 26%); stroke-width: 1.2; }
.compare__icon { color: hsl(210, 30%, 78%); }
.compare__node text { fill: hsl(210, 22%, 62%); font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.06em; text-anchor: middle; }
.compare__node--dim > circle { stroke-dasharray: 3 3; }
.compare__node--lit > circle { fill: hsl(206, 100%, 14%); stroke: var(--cmp-accent); stroke-width: 1.4; }
.compare__node--lit .compare__icon { color: var(--cmp-accent); }
.compare__node--lit text { fill: var(--cmp-text); font-size: 12px; }
.compare__ring { fill: none; stroke: var(--cmp-accent); stroke-width: 1; opacity: 0.18; }
.compare__beam { stroke: var(--cmp-accent); stroke-width: 1.2; opacity: 0.35; }
.compare__beam--sheen { opacity: 1; stroke-width: 2; stroke-dasharray: 18 220; animation: compare-sheen 2.6s linear infinite; }
@keyframes compare-sheen { to { stroke-dashoffset: -238; } }
.compare__core { fill: hsl(206, 100%, 32%); stroke: var(--cmp-accent); stroke-width: 1.5; }
.compare__col h3 { font-size: 1.5rem; margin: 0 0 var(--sp-2); }
.compare__sub { margin: 0 0 var(--sp-8); color: var(--cmp-text-3); font-family: 'JetBrains Mono', monospace; font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; }
.compare__col--brand .compare__sub { color: var(--cmp-accent); }
.compare__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-5); color: var(--cmp-text-2); font-size: var(--fs-base); line-height: 1.5; }
.compare__col li { position: relative; padding-left: 26px; }
.compare__col li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 12px; height: 1.5px; background: var(--cmp-text-3); }
.compare__col--brand li { color: var(--cmp-text); }
.compare__col--brand li::before { width: 5px; height: 10px; top: 0.3em; left: 5px; background: none; border: solid var(--cmp-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.compare__caption { text-align: center; color: var(--cmp-text-2); max-width: 52ch; margin: var(--sp-12) auto 0; }
.compare__cta { display: flex; justify-content: center; margin-top: var(--sp-8); }
@media (max-width: 768px) { .compare__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .compare__beam--sheen { animation: none; opacity: 0.35; } }

/* Закрывающий призыв перед формой */
.closing { text-align: center; padding-block: var(--section-y); }
.closing p { font-weight: 400; font-size: var(--fs-h3); line-height: 1.35; max-width: 34ch; margin: 0 auto var(--sp-10); letter-spacing: -0.01em; }
.closing__cta { display: flex; gap: var(--sp-6); justify-content: center; flex-wrap: wrap; }




/* Мобильная адаптация */
@media (max-width: 768px) {
  :root { --section-y: 3.5rem; }
  .container { width: min(1200px, 100% - 2.5rem); }
  .site-header__inner { gap: var(--sp-6); }
  .hero { padding-top: var(--sp-10); }
  .hero h1 { font-size: clamp(2rem, 1.4rem + 3.5vw, 2.5rem); }
  .hero__lead { font-size: 1.0625rem; max-width: none; }
  .hero__tags { gap: 0.5rem; }
  .hero__tags span { font-size: 0.8125rem; padding: 0.375rem 0.75rem; }
  .hero__cta { display: flex; flex-direction: column; gap: var(--sp-6); }
  .hero__cta .btn { width: 100%; justify-content: center; min-height: 48px; }
  .hero-stack { max-width: 420px; margin-inline: auto; }
    section h2 { font-size: clamp(1.625rem, 1.3rem + 1.8vw, 2rem); }
  .compare__col { padding: var(--sp-8); }
  .compare h2 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 1.875rem); }
  .compare__art { max-width: 340px; margin-inline: auto; }
  .compare__cta .btn { width: 100%; justify-content: center; min-height: 48px; }
  .module-card { padding: var(--sp-10); }
  .showcase__callouts { display: grid; gap: var(--sp-8); }
  .showcase__callout { padding: var(--sp-8); border: var(--bw-thin) solid var(--border); border-radius: var(--r-md); background: var(--surface); }
  .showcase__card { border-radius: 0.5rem; box-shadow: var(--sh-md); }
  .showcase__sparks { display: none; }
  .story__panel { padding: 4.5rem 1.25rem 1.5rem; border-radius: 0.75rem; }
  .story__title { font-size: 1.5rem; }
  .story__text { font-size: 1rem; }
  .story__caps { flex-direction: column; }
  .story__cap { width: auto; min-height: 0; }
  .story__link { align-self: stretch; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .access__form { padding: var(--sp-10); gap: var(--sp-8); }
  .blz-field__control { min-height: 48px; }
  .access__form-actions { flex-direction: column; align-items: stretch; }
  .access__form-actions .btn { min-height: 48px; }
  .site-footer__inner, .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-10) var(--sp-8); }
}
@media (max-width: 768px) {
  .use-cases .container h2 { margin-bottom: var(--sp-8); }
  .story__panel, .story__panel--office, .story__panel--tools, .story__panel--models, .story__panel--access { position: static; margin: 0 1.25rem var(--sp-8); min-height: 0; }
}

/* Согласие и футер */
.access__consent { display: flex; gap: var(--sp-5); align-items: flex-start; font-size: var(--fs-sm); line-height: 1.45; color: var(--text-2); cursor: pointer; }
.access__consent input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--brand); }
.access__consent a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.access__consent.is-invalid span { color: var(--danger); }
.access__consent.is-invalid a { color: var(--danger); }
.site-footer__cols { display: grid; grid-template-columns: repeat(4, auto); gap: var(--sp-8) var(--sp-16, 4rem); }
.site-footer__cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.site-footer__h { margin: 0 0 var(--sp-5); font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.085em; text-transform: uppercase; color: var(--accent-ink); }
.site-footer__cols a { color: var(--text); font-size: var(--fs-sm); line-height: 1.4; }
.site-footer__cols a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.btn.is-loading { opacity: var(--opacity-muted); pointer-events: none; }

.use-cases h2 { margin-bottom: var(--sp-12); position: relative; z-index: 5; }

.to-top {
  position: fixed; right: var(--sp-12); bottom: var(--sp-12); z-index: 50;
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-full); border: var(--bw-thin) solid var(--border-2);
  background: var(--surface-2); color: var(--text); box-shadow: var(--sh-md); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur), border-color var(--dur) var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--brand); color: var(--accent); }
