/* Вёрстка сайта «КУЗЯ». Цвета тем — в tokens.css (подключается раньше этого файла).
   Порядок разделов важен для каскада: база → компоненты → секции → анимации. */

/* ================= База: страница, ссылки, общие строительные блоки разделов ================= */

html { scroll-behavior: smooth; }
html:has([data-menu="open"]) { overflow: hidden; }
body { margin: 0; background: var(--bg); }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1 em, h2 em { color: var(--accent); }

section[id] { scroll-margin-top: 84px; }

.kz-root {
  min-height: 100vh;
  overflow: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
}

/* ---- языки ---- */
[data-lang="ru"] .en, [data-lang="en"] .ru { display: none !important; }
[data-lang="ru"] .ru, [data-lang="en"] .en { animation: kzLangIn .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes kzLangIn { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }

.kz-nowrap { white-space: nowrap; }
.kz-keep-case { text-transform: none; }

/* ---- общие SVG: градиенты знаков ---- */
.kz-defs { position: absolute; }
#kzGold stop:nth-child(1) { stop-color: var(--logo-1); }
#kzGold stop:nth-child(2) { stop-color: var(--logo-2); }
#kzGold stop:nth-child(3) { stop-color: var(--logo-3); }
/* золото тёмной темы — для знака на тёмных подложках в любой теме */
#kzGoldBright stop:nth-child(1) { stop-color: #F2DCA4; }
#kzGoldBright stop:nth-child(2) { stop-color: #C9A25C; }
#kzGoldBright stop:nth-child(3) { stop-color: #94703A; }
#kzDuo stop:nth-child(1) { stop-color: var(--duo-1); }
#kzDuo stop:nth-child(2) { stop-color: var(--duo-2); }
#kzDuo stop:nth-child(3) { stop-color: var(--duo-3); }
#kzDuo stop:nth-child(4) { stop-color: var(--duo-4); }
#kzSheenGrad stop { stop-color: var(--sheen); stop-opacity: 0; }
#kzSheenGrad stop:nth-child(2) { stop-opacity: var(--sheen-opacity); }

/* ---- разделы ---- */
.kz-wrap { max-width: 1200px; margin: 0 auto; }

.kz-section { padding: clamp(72px, 9vw, 124px) var(--gutter); }
.kz-section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.kz-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 64px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.kz-section-title { flex: 1 1 520px; min-width: 0; }
.kz-section-lead {
  flex: 1 1 340px;
  max-width: 440px;
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* надзаголовок: «I —— Собственные продукты» */
.kz-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
}
.kz-eyebrow-num { font-family: var(--font-serif); font-size: 20px; letter-spacing: .08em; }
.kz-rule { width: 36px; height: 1px; background: var(--rule); }

.kz-h2 {
  margin: 22px 0 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.1;
  color: var(--text);
}

/* ---- фоновые декорации ---- */
.kz-deco-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.kz-deco { fill: none; }
.kz-deco-ring { stroke: var(--deco-ring); stroke-width: 1; }
.kz-deco-glow { stroke: #E8CD92; stroke-width: 7; stroke-opacity: var(--deco-glow-opacity); stroke-linecap: round; }
.kz-deco-trace { stroke: var(--deco-trace); stroke-width: 1.4; stroke-opacity: var(--deco-trace-opacity); }

/* маленький ромб-маркер */
.kz-mark { flex: none; fill: none; stroke: var(--icon); stroke-width: 1.2; }

/* ================= Компоненты: кнопки, переключатели языка и темы, кнопка меню ================= */

/* ---- кнопки ---- */
.kz-btn, .kz-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  box-sizing: border-box;
  padding: 0 34px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.kz-btn {
  background: var(--btn-bg);
  color: var(--btn-fg);
  clip-path: var(--chamfer);
  transition: background .25s ease, color .25s ease;
}
.kz-btn:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); }

.kz-ghost {
  border: 1px solid var(--ghost-border);
  color: var(--ghost-fg);
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.kz-ghost:hover {
  background: var(--ghost-hover-bg);
  border-color: var(--ghost-hover-border);
  color: var(--ghost-hover-fg);
}

.kz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---- метки ---- */
.kz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kz-chip {
  padding: 6px 11px;
  border: 1px solid var(--line-chip);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--text-chip);
}

/* ---- переключатель языка RU / EN ---- */
.kz-lang {
  --lang-w: 50px;
  position: relative;
  display: inline-flex;
  height: 44px;
  padding: 3px;
  box-sizing: border-box;
  border: 1px solid var(--control-border);
}
.kz-lang-ind {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: var(--lang-w);
  background: var(--control-ind);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  transition: transform .55s var(--ease-swap);
}
[data-lang="en"] .kz-lang-ind { transform: translateX(var(--lang-w)); }
.kz-lang-btn {
  position: relative;
  z-index: 1;
  width: var(--lang-w);
  height: 100%;
  margin: 0;
  padding: 0 0 0 .2em;
  border: 0;
  background: transparent;
  color: var(--control-fg);
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  cursor: pointer;
  transition: color .4s ease;
}
.kz-lang-btn:hover { color: var(--accent-hover); }
[data-lang="ru"] .kz-lang-ru, [data-lang="en"] .kz-lang-en { color: var(--control-active-fg); }
.kz-lang-btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ---- переключатель темы: два пятиугольника остриями наружу — месяц (тёмная) и солнце (светлая);
        активный режим залит золотом, как индикатор RU / EN ---- */
.kz-theme {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.kz-theme svg { display: block; overflow: visible; }
.kz-theme:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.kz-theme-half {
  fill: url(#kzGold);
  fill-opacity: .12;
  stroke: var(--rule);
  transition: fill-opacity .4s ease, stroke .3s ease;
}
.kz-theme-icon { fill: var(--control-fg); transition: fill .4s ease; }
.kz-theme:hover .kz-theme-half { stroke: var(--accent); }
.kz-theme:hover .kz-theme-icon { fill: var(--accent-hover); }
/* активный режим */
:root:not([data-theme="light"]) .kz-theme-dark .kz-theme-half,
[data-theme="light"] .kz-theme-light .kz-theme-half { fill-opacity: 1; }
:root:not([data-theme="light"]) .kz-theme-dark .kz-theme-icon,
[data-theme="light"] .kz-theme-light .kz-theme-icon { fill: var(--control-active-fg); }

/* ---- кнопка мобильного меню ---- */
.kz-menu-btn {
  display: none;
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.kz-menu-btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.kz-menu-btn svg { position: absolute; left: 0; top: 0; overflow: visible; }
.kz-menu-frame {
  fill: transparent;
  stroke: var(--menu-frame);
  stroke-width: 1;
  transition: fill .4s ease, stroke .4s ease;
}
[data-menu="open"] .kz-menu-frame { fill: var(--menu-frame-open); stroke: var(--accent); }
.kz-l {
  position: absolute;
  left: 12px;
  height: 1.5px;
  background: var(--menu-lines);
  transition: transform .5s var(--ease-swap), opacity .3s ease;
}
.kz-l1 { top: 15px; width: 20px; }
.kz-l2 { top: 21px; left: 20px; width: 12px; transform-origin: right center; }
.kz-l3 { top: 27px; width: 20px; }
[data-menu="open"] .kz-l1 { transform: translateY(6px) rotate(45deg); }
[data-menu="open"] .kz-l2 { opacity: 0; transform: scaleX(0); }
[data-menu="open"] .kz-l3 { transform: translateY(-6px) rotate(-45deg); }

/* ================= Шапка ================= */

.kz-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-header);
  box-shadow: var(--header-shadow);
}
.kz-header-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}

.kz-brand { display: flex; align-items: center; gap: 6px; }
.kz-logo { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.kz-logo svg { display: block; }

.kz-header-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 30px; }

.kz-nav {
  padding: 12px 0;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.kz-nav:hover { color: var(--accent); }

.kz-head-cta {
  min-height: 46px;
  padding: 0 22px;
  border-color: var(--cta-border);
  color: var(--cta-fg);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .22em;
}

/* до 1023 px ссылки разделов и «Обсудить проект» в строку не помещаются (RU нужно ~1008 px) —
   вместо них кнопка меню; порог совпадает с .kz-mpanel и matchMedia в main.js */
@media (max-width: 1023px) {
  .kz-nav, .kz-head-cta { display: none; }
  .kz-menu-btn { display: inline-block; }
  .kz-header-nav { column-gap: 10px; }
}

@media (max-width: 640px) {
  /* с переключателем темы шапка должна помещаться в одну строку от 360px */
  .kz-header-in { column-gap: 10px; }
  .kz-lang { --lang-w: 44px; }
}

/* узкие телефоны: логотип и переключатель на 15 % меньше — высота переключателя по-прежнему как у букв */
@media (max-width: 400px) {
  .kz-logo svg { width: 102px; height: 26.35px; }
  .kz-theme { width: 46px; }
  .kz-theme svg { width: 44.83px; height: 26.35px; }
}

/* ================= Мобильное меню ================= */

.kz-mpanel {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  padding: 104px 24px 32px;
  box-sizing: border-box;
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
[data-menu="open"] .kz-mpanel { opacity: 1; visibility: visible; transition: opacity .45s ease, visibility 0s; }

.kz-mpanel-rings { position: absolute; right: -250px; bottom: -190px; width: 560px; height: 560px; }

.kz-mlink {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .6s cubic-bezier(.2, .7, .2, 1), color .3s ease;
}
[data-menu="open"] .kz-mlink { opacity: 1; transform: none; }
[data-menu="open"] .kz-mnav .kz-mlink:nth-child(2) { transition-delay: .06s; }
[data-menu="open"] .kz-mnav .kz-mlink:nth-child(3) { transition-delay: .12s; }
[data-menu="open"] .kz-mnav .kz-mlink:nth-child(4) { transition-delay: .18s; }
[data-menu="open"] .kz-mnav .kz-mlink:nth-child(5) { transition-delay: .24s; }
[data-menu="open"] .kz-mpanel > .kz-mlink { transition-delay: .32s; }

.kz-mnav {
  position: relative;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.kz-mnav a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
}
.kz-mnav a:hover { color: var(--accent); }
.kz-mnav-num { width: 30px; font-family: var(--font-serif); font-style: italic; font-size: 18px; color: var(--gold); }
.kz-mnav-text { flex: 1; font-family: var(--font-serif); font-weight: 500; font-size: 32px; line-height: 1.15; }

.kz-mpanel-foot { position: relative; margin-top: auto; padding-top: 36px; }
.kz-mpanel-foot .kz-btn { display: flex; padding: 0 24px; }
.kz-mpanel-contacts { margin-top: 16px; text-align: center; font-size: 13px; letter-spacing: .06em; color: var(--text-faint); }

@media (min-width: 1024px) {
  .kz-mpanel { display: none; }
}

/* ================= Первый экран ================= */

.kz-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 92px) var(--gutter) 0;
}

.kz-hero-rings {
  position: absolute;
  left: 50%;
  top: -760px;
  width: 2100px;
  height: 2100px;
  transform: translateX(-50%);
  pointer-events: none;
}

.kz-hero-in {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kz-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .38em;
  text-transform: uppercase;
}
.kz-hero-eyebrow .kz-rule { width: 44px; }

.kz-hero-mark {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: clamp(32px, 4.5vw, 52px) auto clamp(36px, 4.5vw, 56px);
  overflow: visible;
}

.kz-h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 4.6vw, 62px);
  line-height: 1.08;
  letter-spacing: -.005em;
  color: var(--text);
}
.kz-h1 em { font-style: italic; }

.kz-hero-lead {
  max-width: 660px;
  margin: 24px 0 0;
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-soft);
}

.kz-hero .kz-actions { margin-top: 38px; }

/* цифры под первым экраном */
.kz-facts {
  position: relative;
  max-width: 1200px;
  margin: clamp(64px, 8vw, 100px) auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--line);
}
.kz-fact { padding: 30px 26px 34px; border-left: 1px solid var(--line-fact); }
.kz-fact-num { font-family: var(--font-serif); font-size: 48px; line-height: 1; color: var(--accent); }
.kz-fact-text { margin-top: 12px; font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }

/* ================= Собственные продукты ================= */

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

.kz-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-card);
  box-shadow: var(--card-shadow);
  transition: border-color .35s ease, transform .35s ease, box-shadow .35s ease;
}
.kz-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

/* витрина знака: штриховка под 45° */
.kz-hatch {
  position: relative;
  height: 232px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line-art);
  background-color: var(--surface-art);
  background-image: repeating-linear-gradient(45deg, var(--hatch) 0 1px, transparent 1px 16px);
}
.kz-hatch svg { height: auto; }
.kz-card-num {
  position: absolute;
  top: 18px;
  left: 22px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--gold);
}
.kz-card-kind {
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--text-label);
}

.kz-card-body { flex: 1; display: flex; flex-direction: column; padding: 30px 30px 32px; }
.kz-card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(24px, 7vw, 31px);
  letter-spacing: .1em;
  color: var(--text);
}
.kz-card-sub {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.35;
  color: var(--accent);
}

.kz-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}
.kz-list li { display: flex; gap: 14px; }
.kz-list li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 9px;
  border: 1px solid var(--brand-gold);
  transform: rotate(45deg);
}

.kz-card-foot {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.kz-more {
  padding: 12px 0;
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: var(--label-weight);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.kz-more:hover { color: var(--accent-hover); }

/* ================= Заказная разработка: сетка услуг ================= */

.kz-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.kz-cell {
  padding: 32px 28px 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  transition: background .3s ease;
}
.kz-cell:hover { background: var(--bg-hover); }

.kz-cell-head { display: flex; align-items: center; justify-content: space-between; }
.kz-cell-icon { fill: none; stroke: var(--icon); stroke-width: 1.4; stroke-linejoin: miter; }
.kz-cell-num { font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--text-faint); }

.kz-cell h3 {
  margin: 24px 0 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  color: var(--text);
}
.kz-cell p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }

.kz-cell-tags {
  margin-top: 18px;
  font-size: 11px;
  font-weight: var(--label-weight);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tagline);
}

/* ================= Как мы работаем ================= */

.kz-steps-head { margin-bottom: clamp(44px, 5vw, 68px); }

.kz-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 32px;
}

.kz-step-line { display: flex; align-items: center; gap: 12px; }
.kz-step-track { position: relative; flex: 1; height: 1px; background: var(--line-chip); }

.kz-step-num { margin-top: 26px; font-family: var(--font-serif); font-size: 60px; line-height: 1; color: var(--accent); }

.kz-step h3 { margin: 18px 0 0; font-family: var(--font-serif); font-weight: 500; font-size: 26px; color: var(--text); }
.kz-step p { margin: 12px 0 0; font-size: 15px; line-height: 1.65; color: var(--text-muted); }

/* ================= Опыт ================= */

.kz-exp {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 120px) var(--gutter);
  text-align: center;
}

/* ромбы по краям */
.kz-side { position: absolute; top: 50%; width: 520px; height: 520px; margin-top: -260px; pointer-events: none; }
.kz-side-left { left: -290px; }
.kz-side-right { right: -290px; }
@media (max-width: 900px) { .kz-side { display: none; } }

.kz-exp-in {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kz-exp-quote {
  margin: 30px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.35;
  color: var(--text);
}

.kz-exp-tags {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 22px;
  font-size: 12px;
  font-weight: var(--label-weight);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--text-tag);
}

/* ================= Контакты и подвал ================= */

.kz-contact { padding: 0 var(--gutter) clamp(72px, 9vw, 120px); }

.kz-contact-card {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: clamp(52px, 7vw, 92px) clamp(28px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--contact-bg);
  border: 1px solid var(--contact-border);
  outline: 1px solid var(--contact-outline);
  outline-offset: -12px;
  box-shadow: var(--contact-shadow);
}
.kz-contact-frame { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }

.kz-contact-title {
  margin: 30px 0 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.1;
  color: var(--text);
}
.kz-contact-lead {
  max-width: 560px;
  margin: 20px 0 0;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-soft);
}
.kz-contact .kz-actions { margin-top: 36px; }
.kz-contact-meta { margin-top: 22px; font-size: 14px; letter-spacing: .06em; color: var(--text-faint); }

/* ---- подвал ---- */
.kz-footer { border-top: 1px solid var(--line-footer); }
.kz-footer-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px var(--gutter) 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}
.kz-footer-brand { display: flex; align-items: center; gap: 14px; }
.kz-footer-brand svg { display: block; }
.kz-footer-brand span { font-size: 13px; color: var(--text-faint); }
.kz-footer-copy { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-faint); }

/* ================= Фоновые анимации ================= */
/* Длительности и задержки отдельных линий и искр — в атрибутах style разметки. */

.kz-sheen { animation: kzSheen 8s cubic-bezier(.45, .05, .35, 1) 1.2s infinite; }
@keyframes kzSheen { 0% { transform: translateX(0) skewX(-22deg); } 38%, 100% { transform: translateX(3200px) skewX(-22deg); } }
@keyframes kzTrace { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes kzPulse { 0%, 100% { opacity: var(--pulse-min); } 22% { opacity: 1; } }
@keyframes kzRise { 0% { transform: translate3d(0, 0, 0) rotate(45deg); opacity: 0; } 12% { opacity: .85; } 80% { opacity: .4; } 100% { transform: translate3d(36px, -820px, 0) rotate(225deg); opacity: 0; } }
@keyframes kzRiseL { 0% { transform: translate3d(0, 0, 0) rotate(45deg); opacity: 0; } 12% { opacity: .7; } 80% { opacity: .3; } 100% { transform: translate3d(-44px, -700px, 0) rotate(-135deg); opacity: 0; } }
@keyframes kzSlide { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
@keyframes kzFlow { 0% { background-position: 100% 0; } 28%, 100% { background-position: 0 0; } }
@keyframes kzHatch { from { background-position: 0 0; } to { background-position: 226.27px 0; } }
@keyframes kzFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes kzRipple { 0% { transform: rotate(45deg) scale(.4); opacity: 0; } 15% { opacity: .8; } 100% { transform: rotate(45deg) scale(1.9); opacity: 0; } }
@keyframes kzWave { 0%, 32%, 100% { opacity: var(--wave-min); filter: drop-shadow(0 0 0 transparent); } 10% { opacity: 1; filter: drop-shadow(0 0 6px var(--wave-glow)); } }
@keyframes kzBreathe { 0%, 100% { filter: drop-shadow(0 0 0 rgba(232, 205, 146, 0)); } 50% { filter: drop-shadow(0 0 18px rgba(232, 205, 146, .55)); } }

/* ромбы-контуры: пульс и бегущий блик */
.kz-ring { animation: kzPulse 8s ease-in-out infinite; }
.kz-tr { stroke-dasharray: 50 950; animation: kzTrace 14s linear infinite; }
.kz-frame { stroke-dasharray: 70 930; animation: kzTrace 16s linear infinite; }

/* искры, поднимающиеся на первом экране */
.kz-dot {
  position: absolute;
  bottom: -14px;
  width: 5px;
  height: 5px;
  box-sizing: border-box;
  border: 1px solid var(--dot);
  opacity: 0;
  animation: kzRise 22s linear infinite;
}
.kz-dot.kz-fill { background: var(--dot-fill); border-color: transparent; }
.kz-dot.kz-left { animation-name: kzRiseL; }

/* блик, пробегающий по линиям-разделителям */
.kz-header::after, .kz-facts::before, .kz-grid::before, .kz-grid::after, .kz-card::before, .kz-step-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 44%, var(--deco-trace) 50%, transparent 56%) no-repeat;
  background-size: 250% 100%;
  background-position: 100% 0;
  animation: kzSlide 11s ease-in-out infinite;
}
.kz-header::after { bottom: -1px; }
.kz-facts::before { top: -1px; animation-delay: 3s; }
.kz-grid::before { top: -1px; animation-duration: 9s; }
.kz-grid::after { bottom: 0; animation-duration: 9s; animation-delay: 4.5s; animation-direction: reverse; }
.kz-card::before { top: -1px; left: -1px; right: -1px; animation-duration: 8s; }
.kz-card:nth-of-type(2)::before { animation-delay: 1.6s; }
.kz-card:nth-of-type(3)::before { animation-delay: 3.2s; }

/* витрины продуктов: бегущая штриховка, круги от знака, парящий знак */
.kz-hatch { overflow: hidden; animation: kzHatch 24s linear infinite; }
.kz-hatch > span { z-index: 2; }
.kz-hatch::before, .kz-hatch::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  box-sizing: border-box;
  border: 1px solid var(--ripple);
  opacity: 0;
  pointer-events: none;
  animation: kzRipple 7s ease-out infinite;
}
.kz-hatch::after { animation-delay: -3.5s; }
.kz-hatch svg { position: relative; z-index: 1; animation: kzFloat 7s ease-in-out infinite; }
.kz-card:nth-of-type(2) .kz-hatch svg, .kz-card:nth-of-type(2) .kz-hatch::before { animation-delay: -2.3s; }
.kz-card:nth-of-type(2) .kz-hatch::after { animation-delay: -5.8s; }
.kz-card:nth-of-type(3) .kz-hatch svg, .kz-card:nth-of-type(3) .kz-hatch::before { animation-delay: -4.6s; }
.kz-card:nth-of-type(3) .kz-hatch::after { animation-delay: -1.1s; }

/* иконки услуг и шагов вспыхивают по очереди */
.kz-cell svg { animation: kzWave 6.4s ease-in-out infinite; }
.kz-cell:nth-of-type(2) svg { animation-delay: .8s; }
.kz-cell:nth-of-type(3) svg { animation-delay: 1.6s; }
.kz-cell:nth-of-type(4) svg { animation-delay: 2.4s; }
.kz-cell:nth-of-type(5) svg { animation-delay: 3.2s; }
.kz-cell:nth-of-type(6) svg { animation-delay: 4s; }
.kz-cell:nth-of-type(7) svg { animation-delay: 4.8s; }
.kz-cell:nth-of-type(8) svg { animation-delay: 5.6s; }
.kz-step-track::after { top: 0; animation: kzFlow 8s ease-in-out infinite; }
.kz-step-line svg { animation: kzWave 8s ease-in-out infinite; }
.kz-step:nth-child(2) .kz-step-track::after, .kz-step:nth-child(2) .kz-step-line svg { animation-delay: 2s; }
.kz-step:nth-child(3) .kz-step-track::after, .kz-step:nth-child(3) .kz-step-line svg { animation-delay: 4s; }
.kz-step:nth-child(4) .kz-step-track::after, .kz-step:nth-child(4) .kz-step-line svg { animation-delay: 6s; }

.kz-k { animation: kzBreathe 5s ease-in-out infinite; }

/* смена темы: старый вид стоит на месте, новый раскрывается ромбом (theme.js) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (prefers-reduced-motion: reduce) {
  .kz-sheen, .kz-tr, .kz-frame, .kz-dot { animation: none !important; display: none; }
  .kz-ring, .kz-hatch, .kz-hatch svg, .kz-cell svg, .kz-step-line svg, .kz-k, .ru, .en { animation: none !important; }
  .kz-header::after, .kz-facts::before, .kz-grid::before, .kz-grid::after, .kz-card::before,
  .kz-hatch::before, .kz-hatch::after, .kz-step-track::after { display: none; }
  .kz-card, .kz-card:hover { transform: none; }
  .kz-lang-ind, .kz-mpanel, .kz-mlink, .kz-l, .kz-menu-frame, .kz-theme-half, .kz-theme-icon { transition: none !important; }
}
