/* Лендинг kök — минимализм, тёмная и светлая тема, акцент «туман» */
:root, [data-theme="dark"] {
  --bg: #0b0c0e;
  --bg2: #0f1217;
  --glow: #172231;
  --card: #15171b;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f1f2f4;
  --soft: #c9ccd2;
  --muted: #a4a9b2;
  --faint: #8d929b;
  --chip: rgba(255, 255, 255, 0.06);
  --head: rgba(11, 12, 14, 0.8);
  --fog: #cfe0ec;
  --fog-ink: #22384d;
  --ink: #111318;
  --rec: #ff5a4f;
  --rose-bg: rgba(232, 163, 154, 0.14);
  --rose-fg: #eab0a8;
  --sand-bg: rgba(226, 196, 130, 0.14);
  --sand-fg: #e2c482;
  color-scheme: dark;
}
[data-theme="light"] {
  --rose-bg: #f8e3e0;
  --rose-fg: #9b4338;
  --sand-bg: #f5ebd5;
  --sand-fg: #7c6326;
  --bg: #f6f7f9;
  --bg2: #eef1f5;
  --glow: #dfe9f2;
  --card: #ffffff;
  --line: rgba(17, 19, 24, 0.09);
  --text: #111318;
  --soft: #2b3038;
  --muted: #555b66;
  --faint: #6b717c;
  --chip: rgba(17, 19, 24, 0.05);
  --head: rgba(246, 247, 249, 0.84);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg); color: var(--text);
  text-rendering: optimizeLegibility;
  font: 400 17px/1.5 Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(44px, 8.4vw, 88px); line-height: 1; letter-spacing: -0.04em; }
h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -0.03em; }
h3 { font-size: 19px; line-height: 1.3; }
.muted { color: var(--faint); }
.small { font-size: 14px; }

/* Темы: какие картинки показывать */
[data-theme="dark"] .on-l, [data-theme="dark"] .logo-l { display: none; }
[data-theme="light"] .on-d, [data-theme="light"] .logo-d { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--fog); color: var(--ink); font: 600 15px Inter, Arial, sans-serif;
  transition: transform .2s ease, background-color .2s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.ghost { background: var(--chip); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.dark { background: var(--ink); color: #f1f2f4; }
[data-theme="light"] .btn:not(.ghost):not(.dark) { background: var(--ink); color: #f1f2f4; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top, 0px); background: var(--head); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
.top-in { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand img { width: 88px; height: auto; }
.nav { display: none; gap: 26px; margin-left: 28px; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.cta-top { display: none; }
.theme { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--chip); color: var(--text); display: grid; place-items: center; cursor: pointer; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }
.langs { display: flex; background: var(--chip); border-radius: 999px; padding: 3px; }
.langs button, .bill button { border: 0; background: none; color: var(--faint); font: 600 12px Inter, Arial, sans-serif; padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.langs button[aria-pressed="true"], .bill button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* Первый экран */
.hero { position: relative; padding: 64px 0 72px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto 30%; height: 90%; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.hero-in { position: relative; display: grid; gap: 56px; align-items: center; }
.eyebrow { color: var(--muted); font-weight: 500; font-size: 14px; margin-bottom: 20px; }
.lead { font-size: clamp(18px, 2vw, 20px); color: var(--muted); margin: 22px 0 30px; max-width: 520px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }

.hero-shots { position: relative; padding-right: 12%; }
.shot-web { width: 100%; border-radius: 12px; }
.shot-phone { position: absolute; right: 0; bottom: -6%; width: 28%; }
[data-theme="light"] .shot-web, [data-theme="light"] .feat-media img { filter: drop-shadow(0 18px 40px rgba(17, 19, 24, 0.12)); }

/* Загрузка первого экрана */
.hero-copy > *, .hero-shots { opacity: 0; transform: translate3d(0, 18px, 0); animation: up 1s cubic-bezier(.16, 1, .3, 1) forwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .3s; }
.hero-shots { animation-delay: .2s; animation-duration: 1.3s; }
@keyframes up { to { opacity: 1; transform: none; } }

/* Появление при прокрутке */
.rv { opacity: 0; transform: translate3d(0, 32px, 0); transition: opacity 1s cubic-bezier(.22, .61, .36, 1), transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.rv.in { opacity: 1; transform: none; }
.rv.cut { transform: translate3d(0, 40px, 0) scale(.98); }

/* Секции */
section { padding: 88px 0; }
.sub { color: var(--muted); font-size: 18px; margin-top: 14px; max-width: 460px; }
.grid3, .grid4 { display: grid; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px; }
.card p { color: var(--muted); margin-top: 8px; font-size: 15px; }

/* Боль: рабочий чат */
.pain-in { display: grid; gap: 40px; align-items: center; }
.chat { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 10px; max-width: 520px; width: 100%; justify-self: end; }
.chat-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--faint); padding: 0 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.badge { background: var(--rec); color: #fff; font-weight: 600; font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.msg { align-self: flex-start; max-width: 88%; background: var(--chip); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 15px; line-height: 1.4; display: grid; gap: 2px; }
.msg b { font-size: 12px; font-weight: 600; color: var(--faint); }
.msg.me { align-self: flex-end; background: var(--fog); color: var(--ink); border-radius: 16px 16px 4px 16px; }
.msg.me b { color: var(--fog-ink); }
.typing { font-size: 13px; color: var(--faint); padding-left: 4px; }
.chat .msg, .chat .typing { opacity: 0; transform: translate3d(0, 12px, 0); transition: opacity .6s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
.chat.in .msg, .chat.in .typing { opacity: 1; transform: none; }
.chat.in .msg:nth-of-type(2) { transition-delay: .5s; }
.chat.in .msg:nth-of-type(3) { transition-delay: 1.1s; }
.chat.in .msg:nth-of-type(4) { transition-delay: 1.7s; }
.chat.in .msg:nth-of-type(5) { transition-delay: 2.3s; }
.chat.in .typing { transition-delay: 2.9s; }

.losses { list-style: none; display: grid; margin-top: 56px; border-top: 1px solid var(--line); }
.losses li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.losses p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* Главная мысль */
.statement { padding-top: 24px; }
.plate { background: linear-gradient(160deg, #dbe8f2 0%, var(--fog) 55%, #bfd4e6 100%); color: var(--ink); border-radius: 32px; padding: 36px 22px; }
.statement h2 { font-size: clamp(32px, 5.4vw, 60px); line-height: 1.02; letter-spacing: -0.04em; max-width: 860px; margin-bottom: 36px; }
.pc { background: rgba(255, 255, 255, 0.6); border-radius: 20px; padding: 22px; }
.pc p { color: var(--fog-ink); margin-top: 6px; font-size: 15px; }
.pc.dark { background: var(--ink); color: #f1f2f4; }
.pc.dark p { color: #c9ccd2; }

/* Возможности */
.feat { display: grid; gap: 32px; align-items: center; padding: 44px 0; border-top: 1px solid var(--line); }
.num { display: block; color: var(--faint); font-weight: 500; font-size: 14px; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.feat-copy p { color: var(--muted); font-size: 18px; margin-top: 16px; max-width: 480px; }
.feat-media { display: flex; justify-content: center; }
.feat-media img { width: 100%; }
.feat-media .phone { max-width: 290px; }
.feat-media.pair { gap: 14px; align-items: flex-end; }
.feat-media.pair img:first-child { width: 58%; }
.feat-media.pair .phone { width: 40%; }

/* Макеты экранов: настоящие экраны kök (iframe /site/mk/*.html на стилях CRM), масштаб от ширины блока */
.feat > * { min-width: 0; }
.mkf { position: relative; width: 100%; aspect-ratio: var(--w) / var(--h); overflow: hidden; }
.mkf iframe { position: absolute; left: 0; top: 0; width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); border: 0; transform-origin: 0 0; transform: scale(var(--k, 0.3)); pointer-events: none; background: transparent; }
.mkf.web { border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.mkf.card { border-radius: 22px; box-shadow: 0 0 0 1px var(--line), 0 24px 50px -28px rgba(0, 0, 0, 0.55); }
[data-theme="light"] .mkf.web, [data-theme="light"] .mkf.card { box-shadow: 0 0 0 1px var(--line), 0 24px 50px -28px rgba(17, 19, 24, 0.22); }
.dev-phone { position: relative; padding: 3.2%; border-radius: 17% / 8%; background: #050607; box-shadow: inset 0 0 0 1.5px #2c3036, 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
[data-theme="light"] .dev-phone { background: #111318; box-shadow: inset 0 0 0 1.5px #2c3036, 0 30px 60px -30px rgba(17, 19, 24, 0.35); }
.dev-phone .mkf { border-radius: 13.5% / 6.4%; }
.dev-island { position: absolute; left: 50%; top: 4.6%; width: 30%; height: 3.4%; transform: translateX(-50%); border-radius: 999px; background: #000; z-index: 2; }
.hero-shots.crm { position: relative; padding-right: 10%; }
.hero-shots.crm .hero-phone { position: absolute; right: 0; bottom: -8%; width: 27%; }
.feat-media.crm { justify-content: center; }
.feat-media.crm > .dev-phone { width: min(300px, 78%); }
.feat-media.crm > .mkf.card { max-width: 520px; }
.feat-media.crm.pair { gap: 4%; align-items: flex-start; }
.feat-media.crm.pair > .dev-phone { width: 46%; }
.feat-media.crm.pair > .dev-phone + .dev-phone { margin-top: 12%; }

.who h2 { margin-bottom: 32px; max-width: 720px; }

/* Тарифы */
.pr-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.bill { display: flex; background: var(--chip); border-radius: 999px; padding: 4px; }
.bill button { font-size: 14px; padding: 9px 16px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { background: var(--chip); color: var(--text); font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px; white-space: nowrap; }
.plan h3 { font-size: 22px; }
.price span { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price small { color: var(--faint); font-size: 14px; }
.usd { margin-top: -6px; color: var(--muted); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.plan.pro .usd { color: var(--fog-ink); }
.for { color: var(--muted); font-size: 14px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; flex: 1; }
.plan li { position: relative; padding-left: 24px; color: var(--soft); font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 6px; height: 10px; border: solid var(--faint); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.plan.pro { background: linear-gradient(160deg, #dbe8f2 0%, var(--fog) 55%, #bfd4e6 100%); color: var(--ink); border: 0; }
.plan.pro .price small, .plan.pro .for { color: var(--fog-ink); }
.plan.pro li { color: var(--ink); }
.plan.pro li::before { border-color: var(--ink); }
.note { color: var(--faint); font-size: 14px; margin-top: 22px; max-width: 720px; }

/* Демо */
.demo { padding-top: 24px; }
.demo-in { display: grid; gap: 32px; }
.demo-copy p { color: var(--fog-ink); font-size: 18px; margin: 16px 0 22px; max-width: 440px; }
.wa { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fog-ink); }
.form input, .form select { height: 50px; border: 1px solid rgba(17, 19, 24, 0.12); border-radius: 14px; background: rgba(255, 255, 255, 0.75); padding: 0 16px; font: 400 16px Inter, Arial, sans-serif; color: var(--ink); width: 100%; appearance: none; }
.form input:focus, .form select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.form .btn { width: 100%; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { font-size: 15px; font-weight: 600; }
.form-msg.good { color: #1f5f3a; }
.form-msg.bad { color: #8a2f22; }
.consent { font-size: 12px; color: var(--fog-ink); }
.consent a { text-decoration: underline; }

/* Подвал */
.foot { border-top: 1px solid var(--line); padding: 28px 0 36px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; color: var(--faint); font-size: 14px; }
.foot-in img { width: 76px; }
.foot-in a:hover { color: var(--text); }
.foot .langs { margin-left: auto; }
.copy { width: 100%; }

@media (min-width: 760px) {
  .wrap { padding: 0 32px; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .losses { grid-template-columns: repeat(3, 1fr); column-gap: 40px; }
  .plate { padding: 56px; }
  .demo-in { grid-template-columns: 1fr 1fr; align-items: start; }
  .cta-top { display: inline-flex; margin-left: auto; }
  .theme { margin-left: 0; }
  .copy { width: auto; }
}
@media (min-width: 1000px) {
  section { padding: 120px 0; }
  .hero { padding: 96px 0 104px; }
  /* Колонки фиксированной доли: при смене языка макет и кнопки не прыгают */
  .hero-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .hero h1 { font-size: clamp(56px, 5.6vw, 80px); }
  .hero-shots.crm { margin-top: 48px; }
  .nav { display: flex; }
  .cta-top { margin-left: auto; min-width: 176px; }
  .hero .actions .btn { min-width: 204px; }
  .plans .plan { min-height: 560px; }
  .pain-in { grid-template-columns: 1fr 1fr; }
  .grid4 { grid-template-columns: repeat(4, 1fr); }
  .feat { grid-template-columns: 1fr 1fr; gap: 80px; padding: 64px 0; }
  .feat.rev .feat-copy { order: 2; }
}
/* ── kök Edit (/edit) ── */
/* Название «kök Edit»: надпись kök + «Edit» тем же цветом, по нижнему краю; высота E = высоте «ö» */
.ed-brand { display: inline-flex; align-items: flex-end; gap: 7px; color: var(--text); }
[data-theme="light"] .ed-brand { color: #163659; }
.ed-brand img, .foot-in .ed-brand img { width: auto; height: 24px; }
.ed-brand .brand-suf { font-weight: 600; font-size: 23px; line-height: .73; letter-spacing: -0.02em; color: currentColor; }
.ed-brand.sm { gap: 5px; }
.ed-brand.sm img, .foot-in .ed-brand.sm img { height: 18px; }
.ed-brand.sm .brand-suf { font-size: 17px; }
.ed .hero-shots { padding-right: 0; }
.ed h1 { font-size: clamp(40px, 6.4vw, 76px); max-width: 980px; }
.ed .hero-in { grid-template-columns: 1fr; gap: 48px; }
.ed .lead { max-width: 680px; }
.shot-app { width: 100%; border-radius: 14px; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.7); }
[data-theme="light"] .shot-app { box-shadow: 0 30px 70px -30px rgba(17, 19, 24, 0.35); }
.ed .pains .losses { grid-template-columns: 1fr; }
.faq-list { margin-top: 32px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-list summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { color: var(--muted); margin-top: 10px; max-width: 640px; }

.mods-sec h2 { max-width: 720px; }
.mod-tag { color: var(--faint); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.mod.kok .num { color: var(--ink); background: var(--fog); border-radius: 999px; padding: 3px 10px; justify-self: start; font-weight: 600; }
.shots-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 32px; padding-bottom: 8px; }
.shots-row figure { flex: 0 0 74%; scroll-snap-align: start; }
.shots-row img { width: 100%; border-radius: 16px; border: 1px solid var(--line); }
.shots-row figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.mods { list-style: none; margin-top: 48px; border-top: 1px solid var(--line); }
.mod { display: grid; gap: 14px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.mod .num { margin: 0; }
.mod h3 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; }
.mod-copy p { color: var(--muted); font-size: 17px; margin-top: 10px; max-width: 520px; }
.mod.ai .num { color: var(--ink); background: var(--fog); border-radius: 999px; padding: 3px 10px; justify-self: start; font-weight: 600; }
.ticks { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ticks li { position: relative; padding-left: 24px; color: var(--soft); font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 6px; height: 10px; border: solid var(--faint); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.grid2 { display: grid; gap: 14px; }
.btn.dl { gap: 8px; }
.demo-copy .btn.dl { margin: 4px 0 10px; }
.dl-note { color: var(--fog-ink); font-size: 13px !important; margin: 0 0 22px !important; opacity: .85; }
.help-h { margin: 0 0 6px !important; font-size: 15px !important; }

@media (min-width: 760px) {
  .shots-row figure { flex-basis: 40%; }
  .ed .pains .losses { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
  .grid2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .shots-row { display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; overflow: visible; }
  .ed .pains .losses { grid-template-columns: repeat(4, 1fr); column-gap: 32px; }
  .mod { grid-template-columns: 80px 1.2fr 1fr; gap: 40px; align-items: start; padding: 44px 0; }
  .ticks { padding-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-copy > *, .hero-shots, .rv, .chat .msg, .chat .typing { opacity: 1 !important; transform: none !important; }
}

/* Телефон: кнопки первого экрана одной ширины, подвал ровными колонками */
@media (max-width: 759px) {
  .hero .actions { flex-direction: column; align-items: stretch; }
  .hero .actions .btn { width: 100%; }
  .foot-in { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; }
  .foot-in > img, .foot-in > a[href^="mailto:"], .foot-in .langs, .foot-in .copy { grid-column: 1 / -1; }
  .foot-in > img { margin-bottom: 6px; }
  .foot .langs { margin-left: 0; justify-self: start; margin-top: 6px; }
}
