/* ═══════════════════════════════════════════════════════════
   Контур Света — дизайн-система главной (2026-11)

   Идея: фасад днём и ночью + технический чертёж.
   Бетон и графит — фасад; LED-янтарь — свет вывески;
   синька — размерные линии и ссылки.
   Шрифты: Unbounded (вывеска), Golos Text (текст), JetBrains Mono (размеры).
   ═══════════════════════════════════════════════════════════ */

:root {
  --ks-concrete: #E3E5E1;
  --ks-paper: #F4F5F2;
  --ks-ink: #191D21;
  --ks-ink-soft: #545B62;
  --ks-line: #C6CBC5;
  --ks-night: #14181D;
  --ks-night-2: #1B2027;
  --ks-night-line: #2A3038;
  --ks-night-text: #E6E8E4;
  --ks-night-soft: #9CA3AA;
  --ks-led: #FFB547;
  --ks-led-deep: #8A5000;
  --ks-blue: #2F54C9;
  --ks-blue-night: #7F9BFF;

  --ks-display: 'Unbounded', 'Arial Black', sans-serif;
  --ks-text: 'Golos Text', system-ui, sans-serif;
  --ks-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ks-radius: 10px;
  --ks-gutter: clamp(16px, 4vw, 40px);

  /* Перекраска калькулятора, FAQ и cookie-баннера через старые токены */
  --font-heading: var(--ks-display);
  --font-body: var(--ks-text);
  --color-gold: var(--ks-led);
  --color-gold-light: #FFC874;
  --color-gold-pale: #FFF0D6;
  --color-gold-dark: var(--ks-led-deep);
  --color-gold-text: var(--ks-led-deep);
  --color-dark: var(--ks-ink);
  --color-dark-secondary: #262B30;
  --color-light: var(--ks-concrete);
  --color-light-secondary: #D9DCD7;
  --color-text-muted: var(--ks-ink-soft);
  --color-text-subtle: var(--ks-ink-soft);
  --color-border: var(--ks-line);
  --color-border-strong: #AEB4AD;
  --color-border-accent: rgba(255, 181, 71, 0.5);
  --color-gold-dim: rgba(255, 181, 71, 0.16);
  --color-gold-dim-soft: rgba(255, 181, 71, 0.08);
}

/* ── База ─────────────────────────────────────────────────── */

body {
  background: var(--ks-concrete);
  color: var(--ks-ink);
  font-family: var(--ks-text);
  font-size: 17px;
  line-height: 1.55;
}

body::before,
body::after {
  content: none;
}

/* Анимации появления старого сайта — контент всегда виден */
[data-reveal],
html.js-reveal-ready [data-reveal]:not(.is-revealed) {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--ks-blue);
  outline-offset: 3px;
}

.ks-wrap,
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--ks-gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ks-ink);
  color: var(--ks-paper);
}

.skip-link:focus {
  top: 12px;
}

/* ── Типографика ──────────────────────────────────────────── */

.ks-eyebrow {
  margin: 0 0 18px;
  font-family: var(--ks-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ks-blue);
}

.ks-h2 {
  max-width: 20ch;
  margin: 0 0 36px;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.ks-sub {
  max-width: 62ch;
  margin: -20px 0 36px;
  color: var(--ks-ink-soft);
}

.ks-link {
  font-weight: 600;
  color: var(--ks-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.ks-link::after {
  content: ' →';
}

.ks-link:hover {
  text-decoration-thickness: 2px;
}

/* ── Кнопки ───────────────────────────────────────────────── */

.ks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  font-family: var(--ks-display);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ks-btn--sm {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 13px;
}

.ks-btn--led {
  background: var(--ks-led);
  color: var(--ks-ink);
}

.ks-btn--led:hover {
  box-shadow: 0 0 0 4px rgba(255, 181, 71, 0.3), 0 0 28px rgba(255, 181, 71, 0.55);
}

.ks-btn--ghost {
  border-color: currentColor;
  color: var(--ks-ink);
  background: transparent;
}

.ks-btn--ghost:hover {
  background: var(--ks-ink);
  color: var(--ks-paper);
}

/* ── Шапка ────────────────────────────────────────────────── */

.ks-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(227, 229, 225, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ks-line);
}

.ks-header__row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.ks-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ks-ink);
  text-decoration: none;
}

.ks-logo img {
  width: 36px;
  height: auto;
}

.ks-logo b {
  font-weight: 700;
  color: var(--ks-led-deep);
}

.ks-nav {
  display: flex;
  gap: 24px;
  margin-inline: auto;
}

.ks-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ks-ink);
  text-decoration: none;
}

.ks-nav a:hover {
  color: var(--ks-blue);
}

.ks-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ks-header__phone {
  font-family: var(--ks-mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--ks-ink);
  text-decoration: none;
  white-space: nowrap;
}

.ks-burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--ks-ink);
  border-radius: 6px;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ks-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ks-ink);
  transition: transform 160ms ease;
}

.is-menu-open .ks-burger span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.is-menu-open .ks-burger span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

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

.ks-hero {
  padding: clamp(36px, 6vw, 72px) 0 0;
}

.ks-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.ks-hero__title {
  margin: 0;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: clamp(38px, 5.4vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.ks-hero__spec {
  margin: 22px 0 0;
  font-family: var(--ks-mono);
  font-size: 15px;
  color: var(--ks-blue);
}

.ks-hero__lede {
  max-width: 44ch;
  margin: 18px 0 0;
  font-size: 18px;
  color: var(--ks-ink-soft);
}

.ks-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.ks-hero__call {
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--ks-ink-soft);
}

.ks-hero__call a {
  font-family: var(--ks-mono);
  font-weight: 500;
  color: var(--ks-ink);
}

/* ── Примерка вывески (главный элемент страницы) ─────────── */

.ks-try {
  margin: 0;
  border-radius: var(--ks-radius);
  overflow: hidden;
  background: var(--ks-paper);
  box-shadow: 0 24px 60px -24px rgba(20, 24, 29, 0.45);
}

.ks-try__wall {
  --wall: var(--ks-night);
  --brick: rgba(255, 255, 255, 0.035);
  --dim: var(--ks-blue-night);
  display: grid;
  place-items: center;
  min-height: clamp(220px, 26vw, 320px);
  padding: 36px 20px 28px;
  background-color: var(--wall);
  background-image:
    radial-gradient(ellipse 60% 45% at 50% 46%, rgba(255, 181, 71, 0.2), transparent 70%),
    repeating-linear-gradient(0deg, var(--brick) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, var(--brick) 0 1px, transparent 1px 96px);
  transition: background-color 400ms ease;
}

.ks-try[data-mode="day"] .ks-try__wall {
  --wall: #C9C6BE;
  --brick: rgba(25, 29, 33, 0.07);
  --dim: var(--ks-blue);
  background-image:
    repeating-linear-gradient(0deg, var(--brick) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, var(--brick) 0 1px, transparent 1px 96px);
}

.ks-try__stage {
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px 14px;
  align-items: stretch;
}

.ks-try__sign {
  grid-column: 2;
  font-family: var(--ks-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #FFE7BF;
  text-shadow:
    1px 1px 0 #7B6040,
    2px 2px 0 #5E4A33,
    3px 3px 0 #4A3B2A,
    0 0 6px rgba(255, 181, 71, 0.95),
    0 0 22px rgba(255, 181, 71, 0.65),
    0 0 56px rgba(255, 181, 71, 0.4);
  transition: color 400ms ease, text-shadow 400ms ease;
}

.ks-try[data-mode="day"] .ks-try__sign {
  color: #F7F6F2;
  text-shadow:
    1px 1px 0 #A3A7AB,
    2px 2px 0 #8E9297,
    3px 3px 0 #7A7E83,
    6px 8px 10px rgba(20, 24, 29, 0.35);
}

/* Размерные линии в стиле чертежа */
.ks-try__dim {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ks-mono);
  font-size: 12px;
  color: var(--dim);
}

.ks-try__dim--w {
  grid-column: 2;
  height: 18px;
  border-left: 1px solid var(--dim);
  border-right: 1px solid var(--dim);
}

.ks-try__dim--w::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--dim);
}

.ks-try__dim--w span {
  position: relative;
  padding: 0 8px;
  background: var(--wall);
  transition: background-color 400ms ease;
}

.ks-try__dim--h {
  grid-column: 1;
  grid-row: 1;
  width: 18px;
  border-top: 1px solid var(--dim);
  border-bottom: 1px solid var(--dim);
}

.ks-try__dim--h::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid var(--dim);
}

.ks-try__dim--h span {
  position: absolute;
  right: 22px;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.ks-try__panel {
  display: grid;
  gap: 12px;
  padding: 20px 22px 22px;
}

.ks-try__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ks-try__label {
  font-family: var(--ks-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ks-ink-soft);
}

.ks-try__modes {
  display: inline-flex;
  border: 1px solid var(--ks-line);
  border-radius: 6px;
  overflow: hidden;
}

.ks-try__mode {
  min-height: 34px;
  padding: 4px 14px;
  border: 0;
  background: transparent;
  font-family: var(--ks-mono);
  font-size: 12px;
  color: var(--ks-ink-soft);
  cursor: pointer;
}

.ks-try__mode[aria-pressed="true"] {
  background: var(--ks-ink);
  color: var(--ks-paper);
}

.ks-try__input {
  width: 100%;
  padding: 6px 0 8px;
  border: 0;
  border-bottom: 2px solid var(--ks-ink);
  border-radius: 0;
  background: transparent;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  color: var(--ks-ink);
}

.ks-try__input:focus {
  outline: none;
  border-bottom-color: var(--ks-blue);
}

.ks-try__result {
  margin: 0;
  font-size: 16px;
}

.ks-try__result b {
  font-family: var(--ks-display);
  font-weight: 700;
  white-space: nowrap;
}

.ks-try__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ks-try__note {
  margin: 0;
  font-size: 13px;
  color: var(--ks-ink-soft);
}

/* ── Факты под первым экраном ─────────────────────────────── */

.ks-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 20px;
  border-top: 1px solid var(--ks-line);
  border-bottom: 1px solid var(--ks-line);
  list-style: none;
  font-family: var(--ks-mono);
  font-size: 14px;
}

.ks-facts li + li::before {
  content: '/';
  margin: 0 14px;
  color: var(--ks-blue);
}

/* ── Секции ───────────────────────────────────────────────── */

.ks-section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.ks-section--night {
  background: var(--ks-night);
  color: var(--ks-night-text);
}

.ks-section--night .ks-sub,
.ks-section--night figcaption {
  color: var(--ks-night-soft);
}

.ks-section--night .ks-link {
  color: var(--ks-led);
}

/* Как начать */
.ks-ways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ks-way {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-paper);
}

.ks-way h3 {
  margin: 0;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
}

.ks-way p {
  margin: 0 0 8px;
  color: var(--ks-ink-soft);
}

.ks-way .ks-btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Что производим */
.ks-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ks-product {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 24px;
  border: 1px solid var(--ks-night-line);
  border-radius: var(--ks-radius);
  background: var(--ks-night-2);
  overflow: hidden;
}

.ks-product > :not(img) {
  margin: 0;
  padding-inline: 22px;
}

.ks-product img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 6px;
}

.ks-product h3 {
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
}

.ks-product__price {
  font-family: var(--ks-mono);
  font-size: 14px;
  color: var(--ks-led);
}

.ks-product p:not(.ks-product__price) {
  font-size: 15px;
  color: var(--ks-night-soft);
}

.ks-product .ks-link {
  margin-top: auto;
  padding-top: 6px;
}

.ks-product--plain {
  justify-content: flex-end;
  padding-top: 24px;
  background:
    linear-gradient(var(--ks-night-2), var(--ks-night-2)) padding-box,
    repeating-linear-gradient(45deg, var(--ks-night-line) 0 6px, transparent 6px 12px) border-box;
  border: 1px dashed var(--ks-night-line);
}

/* Под тип бизнеса */
.ks-for {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-for li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 22px;
  border-top: 2px solid var(--ks-ink);
}

.ks-for h3 {
  margin: 0;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: 20px;
}

.ks-for p {
  margin: 0;
  color: var(--ks-ink-soft);
}

.ks-for__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* Производство */
.ks-build {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.ks-build__parts {
  display: grid;
  margin: 0;
}

.ks-build__parts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--ks-night-line);
}

.ks-build__parts dt {
  font-family: var(--ks-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ks-led);
}

.ks-build__parts dd {
  margin: 0;
}

.ks-build__img {
  margin: 0;
}

.ks-build__img img {
  width: 100%;
  height: auto;
  border-radius: var(--ks-radius);
}

.ks-build__img figcaption {
  margin-top: 10px;
  font-family: var(--ks-mono);
  font-size: 12px;
}

/* Как работаем: настоящая последовательность — нумерация уместна */
.ks-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.ks-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 52px;
  counter-increment: step;
}

.ks-steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ks-ink);
  color: var(--ks-led);
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: 14px;
}

.ks-steps li::after {
  content: '';
  position: absolute;
  top: 17px;
  left: 44px;
  right: -14px;
  border-top: 1px dashed var(--ks-ink-soft);
}

.ks-steps li:last-child::after {
  content: none;
}

.ks-steps__when {
  font-family: var(--ks-mono);
  font-size: 13px;
  color: var(--ks-blue);
}

.ks-steps h3 {
  margin: 0;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: 18px;
}

.ks-steps p {
  margin: 0;
  font-size: 15px;
  color: var(--ks-ink-soft);
}

/* ── Калькулятор и FAQ в новой системе ───────────────────── */

.faq.ks-section {
  background: transparent;
}

/* Дисклеймеры: короткая версия на телефоне, полная на ПК (legal.js) */
.legal-disclaimer-desktop {
  display: none;
}

@media (min-width: 768px) {
  .legal-disclaimer-mobile {
    display: none;
  }

  .legal-disclaimer-desktop {
    display: inline;
  }
}

.faq.ks-section {
  border-top: 1px solid var(--ks-line);
}

.faq__list {
  max-width: 880px;
  margin-inline: 0;
}

.faq__question-text {
  font-family: var(--ks-display);
  font-weight: 500;
}

/* ── Подвал и контакты ────────────────────────────────────── */

.ks-footer {
  padding: clamp(64px, 9vw, 104px) 0 calc(40px + env(safe-area-inset-bottom));
  background: var(--ks-night);
  color: var(--ks-night-text);
}

.ks-footer .ks-sub {
  color: var(--ks-night-soft);
}

.ks-footer .ks-btn--ghost {
  color: var(--ks-night-text);
}

.ks-footer .ks-btn--ghost:hover {
  background: var(--ks-night-text);
  color: var(--ks-night);
}

.ks-footer__channels {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ks-footer__channels .contact-phone,
.ks-footer__channels [data-legal-email] {
  font-family: var(--ks-mono);
}

.ks-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--ks-night-line);
}

.ks-footer__label {
  margin: 0 0 14px;
  font-family: var(--ks-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ks-night-soft);
}

.ks-footer__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-footer__list a,
.ks-footer__cookie {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ks-night-text);
  text-decoration: none;
  cursor: pointer;
}

.ks-footer__list a:hover,
.ks-footer__cookie:hover {
  color: var(--ks-led);
}

.ks-footer__legal {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ks-night-soft);
}

.ks-footer__disclaimer,
.ks-footer__copy {
  margin: 32px 0 0;
  font-size: 12px;
  color: var(--ks-night-soft);
}

.ks-footer__copy {
  margin-top: 12px;
}

/* ── Страницы услуг и хаб ─────────────────────────────────── */

.ks-page__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(32px, 5vw, 64px) clamp(48px, 6vw, 80px);
}

.ks-page__hero--solo {
  grid-template-columns: minmax(0, 1fr);
}

.ks-page__title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.ks-page__lede {
  max-width: 58ch;
  margin: 20px 0 0;
  font-size: 18px;
  color: var(--ks-ink-soft);
}

.ks-page__media {
  margin: 0;
}

.ks-page__media img {
  width: 100%;
  height: auto;
  border-radius: var(--ks-radius);
  background: var(--ks-night);
}

.ks-page__media figcaption {
  margin-top: 10px;
  font-family: var(--ks-mono);
  font-size: 12px;
  color: var(--ks-ink-soft);
}

.ks-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-family: var(--ks-mono);
  font-size: 13px;
  color: var(--ks-ink-soft);
}

.ks-crumbs li + li::before {
  content: '/';
  margin: 0 10px;
  color: var(--ks-blue);
}

.ks-crumbs a {
  color: var(--ks-ink);
}

.ks-page__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-block: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--ks-line);
}

.ks-prose {
  max-width: 68ch;
}

.ks-prose h2 {
  margin: 40px 0 14px;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.2;
}

.ks-prose h2:first-child {
  margin-top: 0;
}

.ks-prose p {
  margin: 0 0 14px;
}

.ks-spec {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: var(--ks-radius);
  background: var(--ks-night);
  color: var(--ks-night-text);
}

.ks-spec__title {
  margin: 0;
  font-family: var(--ks-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ks-night-soft);
}

.ks-spec dl {
  display: grid;
  margin: 0;
}

.ks-spec dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--ks-night-line);
  font-size: 15px;
}

.ks-spec dd {
  margin: 0;
  font-family: var(--ks-mono);
  color: var(--ks-led);
  text-align: right;
}

.ks-spec__note {
  margin: 0;
  font-size: 13px;
  color: var(--ks-night-soft);
}

.ks-page__faq,
.ks-related {
  padding-block: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--ks-line);
}

.ks-qa {
  max-width: 880px;
}

.ks-qa details {
  border-bottom: 1px solid var(--ks-line);
}

.ks-qa summary {
  padding: 18px 0;
  font-family: var(--ks-display);
  font-weight: 500;
  font-size: 17px;
  cursor: pointer;
}

.ks-qa details p {
  margin: 0 0 18px;
  color: var(--ks-ink-soft);
}

.ks-related ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-hub ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0 0 clamp(64px, 8vw, 104px);
  list-style: none;
}

.ks-hub__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 0 0 22px;
  border-radius: var(--ks-radius);
  overflow: hidden;
  background: var(--ks-night-2);
  color: var(--ks-night-text);
  text-decoration: none;
}

.ks-hub__card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ks-hub__name,
.ks-hub__desc {
  padding-inline: 20px;
}

.ks-hub__name {
  padding-top: 14px;
  font-family: var(--ks-display);
  font-weight: 700;
  font-size: 17px;
}

.ks-hub__desc {
  font-size: 14px;
  color: var(--ks-night-soft);
}

.ks-hub__card:hover .ks-hub__name {
  color: var(--ks-led);
}

/* ── Нижняя панель (телефон) ──────────────────────────────── */

.ks-dock {
  display: none;
}

/* ── Планшет ──────────────────────────────────────────────── */

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

  .ks-burger {
    display: inline-flex;
  }

  .is-menu-open .ks-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 8px var(--ks-gutter) 20px;
    background: var(--ks-concrete);
    border-bottom: 1px solid var(--ks-line);
  }

  .is-menu-open .ks-nav a {
    padding: 14px 0;
    font-family: var(--ks-display);
    font-size: 18px;
    border-bottom: 1px solid var(--ks-line);
  }

  .ks-header__actions {
    margin-left: auto;
  }

  .ks-hero__grid,
  .ks-build,
  .ks-page__hero,
  .ks-page__body {
    grid-template-columns: 1fr;
  }

  .ks-spec {
    position: static;
  }

  .ks-page__media {
    max-width: 480px;
  }

  .ks-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ks-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ks-steps li {
    padding: 0 0 28px 54px;
  }

  .ks-steps li::after {
    top: 42px;
    bottom: 6px;
    left: 17px;
    right: auto;
    border-top: 0;
    border-left: 1px dashed var(--ks-ink-soft);
  }
}

/* ── Телефон ──────────────────────────────────────────────── */

@media (max-width: 767px) {
  body {
    font-size: 16px;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .ks-header__row {
    gap: 12px;
    min-height: 60px;
  }

  .ks-header__phone,
  .ks-header__actions > .ks-btn {
    display: none;
  }

  /* Вывеска сразу под заголовком */
  .ks-hero__copy {
    display: contents;
  }

  .ks-hero__grid {
    gap: 0;
  }

  .ks-eyebrow { order: 1; }
  .ks-hero__title { order: 2; }
  .ks-hero__spec { order: 3; }
  .ks-try { order: 4; margin-top: 24px; }
  .ks-hero__lede { order: 5; margin-top: 24px; }
  .ks-hero__actions { order: 6; }
  .ks-hero__call { order: 7; }

  .ks-hero__actions .ks-btn {
    flex: 1 1 100%;
  }

  .ks-try__panel {
    padding: 18px 16px 20px;
  }

  .ks-try__actions .ks-btn {
    flex: 1 1 auto;
  }

  .ks-facts {
    flex-direction: column;
  }

  .ks-facts li + li::before {
    content: none;
  }

  .ks-facts li::before,
  .ks-facts li + li::before {
    content: '— ';
    margin: 0;
    color: var(--ks-blue);
  }

  .ks-ways,
  .ks-products,
  .ks-for,
  .ks-footer__grid {
    grid-template-columns: 1fr;
  }

  .ks-way {
    padding: 22px;
  }

  .ks-way .ks-btn {
    align-self: stretch;
  }

  .ks-product img {
    aspect-ratio: 16 / 10;
  }

  .ks-footer__channels .ks-btn {
    flex: 1 1 100%;
  }

  .ks-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(227, 229, 225, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--ks-line);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
  }

  /* Прячется, пока на экране свои кнопки связи (site.js → initDock) */
  .ks-dock.is-away {
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 280ms;
  }

  .ks-dock__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: 1.5px solid var(--ks-ink);
    border-radius: 6px;
    font-family: var(--ks-display);
    font-weight: 500;
    font-size: 14px;
    color: var(--ks-ink);
    text-decoration: none;
  }

  .ks-dock__btn--led {
    border-color: var(--ks-led);
    background: var(--ks-led);
  }

  .cookie-consent {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
