/* Сайт «Перемены». Палитра из макета: фиолетовый акцент, лавандовый фон, белые карточки.
   --accent-fill — заливка кнопок (белый текст на ней ≥ 4.5:1),
   --accent — цвет текста-акцента на фоне страницы (≥ 4.5:1 и в светлой, и в тёмной теме). */
:root {
  --bg: #f6f1fe;
  --bg-2: #ede3fc;
  --surface: #ffffff;
  --ink: #17141f;
  --muted: #5b5370;
  --line: #e4d9f5;
  --accent: #7e22ce;
  --accent-fill: #9333ea;
  --accent-fill-hover: #7e22ce;
  --accent-strong: #6b21a8;
  --accent-soft: #e9d8fd;
  --dark: #120c1c;
  --dark-2: #1f1630;
  --faq: #1d4ed8;
  --shelf: #a16207;
  --quiet: #0f766e;
  --ok: #15803d;
  --focus: #7e22ce;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(60, 20, 110, .06), 0 12px 32px rgba(60, 20, 110, .08);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --wrap: 1140px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110d18; --bg-2: #1a1424; --surface: #1d1828; --ink: #f2eefa; --muted: #b3abc6; --line: #2f2740;
    --accent: #c084fc; --accent-fill: #9333ea; --accent-fill-hover: #7e22ce; --accent-strong: #d8b4fe;
    --accent-soft: #2e1f47; --faq: #93c5fd; --shelf: #fbbf24; --quiet: #5eead4; --ok: #4ade80; --focus: #d8b4fe;
    --shadow: none; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* иначе .btn с display:flex перебивает атрибут hidden */
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Open Sans", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
h3 { font-size: 20px; margin-bottom: 8px; }
p { text-wrap: pretty; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section-lead { max-width: 62ch; }
section { padding-block: clamp(56px, 8vw, 96px); }
section.tint { background: var(--bg-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

/* --- иконки --- */
svg use { pointer-events: none; }
.ico svg, .role-ico svg, .cta-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

/* --- кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 22px; border-radius: 14px; border: 2px solid var(--accent-fill); background: var(--accent-fill);
  color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 16px; line-height: 1.2;
  transition: transform .16s var(--ease-out), background-color .15s ease, border-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn.outline { background: transparent; color: var(--accent); border-color: currentColor; }
.btn.ghost { background: transparent; color: var(--accent); border-color: transparent; text-decoration: underline; }
.linkish { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; min-height: 24px; }
.btn.light { background: #fff; color: #6b21a8; border-color: #fff; }
.btn.on-accent { background: transparent; color: #fff; border-color: #fff; }
.btn.sm { min-height: 44px; padding: 8px 16px; font-size: 15px; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); color: #fff; }
  .btn.outline:hover, .btn.ghost:hover { background: var(--accent-soft); color: var(--accent); border-color: currentColor; }
  .btn.ghost:hover { border-color: transparent; }
  .btn.light:hover { background: #f3e8ff; border-color: #f3e8ff; color: #6b21a8; }
  .btn.on-accent:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
}

/* --- шапка --- */
.top {
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { font-weight: 900; letter-spacing: .08em; color: var(--accent); text-decoration: none; font-size: 20px; padding: 10px 0; }
.nav { display: flex; gap: 6px; margin-right: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.top-actions { display: flex; gap: 10px; margin-left: auto; }
@media (max-width: 900px) { .nav { display: none; } }
@media (max-width: 420px) { .top-actions .btn.outline[data-cabinet] { display: none; } .top .wrap { gap: 12px; } }

/* --- первый экран --- */
.hero { padding-block: clamp(36px, 7vw, 88px); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6.2vw, 70px); font-weight: 900; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); margin: 20px 0 28px; max-width: 36ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.hero .note a { color: var(--accent); font-weight: 600; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 420px) { .hero .cta .btn { flex: 1 1 100%; } }

/* пиксельный узор — отсылка к стилю хакатона */
.pixels { position: absolute; inset: auto -40px -60px auto; width: 420px; height: 420px; opacity: .35; pointer-events: none;
  background-image: radial-gradient(var(--accent-fill) 22%, transparent 23%); background-size: 18px 18px;
  mask-image: radial-gradient(circle at 70% 70%, #000 0 35%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 70% 70%, #000 0 35%, transparent 70%); }

/* --- «телефоны» с экранами из макета --- */
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.phones > div + div { margin-top: 40px; }
.phone { background: var(--surface); border-radius: 30px; padding: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.phone-bar { display: flex; justify-content: space-between; background: var(--bg-2); border-radius: 14px;
  padding: 10px 12px; font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .04em; }
.phone-bar span:last-child { color: var(--muted); font-weight: 600; }
.phone-label { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 0 8px 6px; }
.phone-title { margin-top: 14px; }
.phone-missing { margin-top: 12px; }
.bubble { background: var(--bg-2); border-radius: 18px; padding: 14px; margin: 14px 0 10px; font-size: 15px; }
.opt { border: 1.5px solid var(--accent); color: var(--accent); border-radius: 12px; padding: 10px 12px; font-weight: 700;
  font-size: 14px; margin-top: 8px; }
.opt.on { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.big { font-size: 44px; font-weight: 900; color: var(--accent); line-height: 1; margin: 16px 0 10px; font-variant-numeric: tabular-nums; }
.big small { font-size: 22px; color: var(--muted); }
.bar { height: 10px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 92%; background: var(--accent-fill); border-radius: 99px; }
.small { font-size: 14px; }
.ok { color: var(--ok); font-weight: 600; margin-top: 8px; }
.mini-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.mini-btns span { text-align: center; border-radius: 10px; padding: 9px 4px; font-weight: 700; font-size: 13px;
  border: 1.5px solid var(--accent); color: var(--accent); }
.mini-btns span:first-child { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
@media (max-width: 560px) { .phones { grid-template-columns: 1fr; } .phones > div + div { margin-top: 0; } }

/* --- живой счётчик --- */
.counter { background: var(--dark); color: #fff; padding-block: 34px; }
.counter .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.counter b { display: block; font-size: clamp(30px, 4vw, 42px); color: #d8b4fe; line-height: 1.1; font-variant-numeric: tabular-nums; }
.counter span { color: #d6cee6; font-size: 15px; }

/* --- проблема --- */
.dark { background: var(--dark); color: #f2eefa; }
.dark .muted { color: #c3bad6; }
.dark .eyebrow { color: #d8b4fe; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 920px) { .grid2 { grid-template-columns: 1fr; } }
.chat { background: var(--dark-2); border-radius: 28px; padding: 22px; border: 1px solid #2f2742; margin-top: 24px; }
.chat-head { font-weight: 700; margin-bottom: 14px; }
.chat-head span { color: #a99ec2; font-weight: 500; }
.msg { background: #2c2240; border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; width: fit-content; max-width: 90%; }
.msg b { display: block; font-size: 13px; color: #d8b4fe; }
.msg.bot { margin-left: auto; background: #3b2463; border: 1px solid #6b3fa8; }
.msg.bot i { display: block; font-size: 13px; color: #d6cee6; margin-top: 4px; }
.chat-foot { color: #f9a8d4; font-weight: 700; font-size: 15px; margin-top: 10px; }
.pains { display: grid; gap: 12px; }
.pain { display: flex; gap: 16px; align-items: center; background: var(--dark-2); border: 1px solid #2f2742;
  border-radius: 18px; padding: 16px 18px; }
.pain .ico { width: 46px; height: 46px; border-radius: 50%; background: #3b1f2e; color: #f9a8d4; display: grid;
  place-items: center; padding: 11px; flex: none; }
.pain b { display: block; }

/* --- возможности --- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-top: 34px; }
.features-3 { margin-top: 22px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature p { margin: 0; }
.feature .ico { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.feature.c-faq .ico { color: var(--faq); background: color-mix(in srgb, var(--faq) 14%, transparent); }
.feature.c-shelf .ico { color: var(--shelf); background: color-mix(in srgb, var(--shelf) 14%, transparent); }
.feature.c-quiet .ico { color: var(--quiet); background: color-mix(in srgb, var(--quiet) 14%, transparent); }
.feature.main { background: #7e22ce; color: #fff; border-color: #7e22ce; grid-column: span 2; }
.feature.main .muted { color: #fff; }
.feature.main .ico { background: rgba(255, 255, 255, .16); color: #fff; }
@media (max-width: 680px) { .feature.main { grid-column: auto; } }
.feature .tag { display: inline-block; font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.feature.main .tag { background: #fff; color: #6b21a8; }
.c-faq h3 { color: var(--faq); } .c-shelf h3 { color: var(--shelf); } .c-quiet h3 { color: var(--quiet); }

/* --- польза --- */
.benefit { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; margin-top: 34px; align-items: center; }
@media (max-width: 860px) { .benefit { grid-template-columns: 1fr; gap: 28px; } }
.benefit table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.benefit th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 14px 18px 10px; border-bottom: 1px solid var(--line); }
.benefit td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.benefit th:last-child, .benefit td:last-child { text-align: right; white-space: nowrap; }
.benefit td:last-child { font-weight: 800; }
.benefit td:nth-child(2) { white-space: nowrap; }
.benefit tfoot td { border-bottom: 0; color: var(--accent); font-size: 19px; font-weight: 800; }
.days b { font-size: clamp(88px, 13vw, 150px); font-weight: 900; color: var(--accent); line-height: .9; display: block;
  letter-spacing: -.03em; white-space: nowrap; }
.days span { display: block; font-size: 22px; font-weight: 700; margin-top: 8px; }
.days p { margin: 10px 0 0; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
@media (max-width: 520px) {
  .benefit th, .benefit td { padding: 12px; font-size: 15px; }
  .benefit th:nth-child(2), .benefit td:nth-child(2) { display: none; }
}

/* --- шаги --- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; counter-reset: step;
  margin: 30px 0 0; padding: 0; list-style: none; }
.step { background: var(--surface); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.step p { margin: 0; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--accent-fill); color: #fff; font-weight: 900; margin-bottom: 14px; }
.after-steps { margin: 22px 0 0; }
.after-steps a { color: var(--accent); font-weight: 600; }

/* --- роли --- */
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-top: 30px; }
.role { border-radius: var(--radius); padding: 22px; background: var(--surface); border: 1px solid var(--line); }
.role b { display: block; font-size: 18px; margin-bottom: 6px; }
.role-ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }

/* --- CTA --- */
.cta-block { background: linear-gradient(135deg, #6b21a8, #7e22ce 55%, #9333ea); color: #fff; border-radius: 32px;
  padding: clamp(28px, 6vw, 64px); display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center; }
.cta-block h2 { color: #fff; }
.cta-block p { color: #fff; font-size: 19px; margin: 0 0 24px; }
.cta-ico { width: 150px; height: 150px; margin: 0 auto; color: rgba(255, 255, 255, .85); }
@media (max-width: 860px) { .cta-block { grid-template-columns: 1fr; } .cta-ico { display: none; } }

/* --- команда --- */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; margin-top: 30px; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.member .ava { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 900; font-size: 18px; margin-bottom: 10px; }
.member .chip { display: inline-block; font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 99px;
  background: var(--accent-fill); color: #fff; margin-top: 8px; }

footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* --- вход --- */
.login { min-height: calc(100vh - 69px); min-height: calc(100dvh - 69px); display: grid; place-items: center; padding: 32px 16px; }
.login-card { background: var(--surface); border-radius: 28px; padding: clamp(22px, 5vw, 40px); box-shadow: var(--shadow);
  border: 1px solid var(--line); width: min(460px, 100%); text-align: center; }
.login-card h1 { font-size: 28px; margin-bottom: 8px; }
.login-card > p { margin: 0; }
.way { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.way-title { font-weight: 800; margin-bottom: 10px; }
.way .btn { width: 100%; }
.pin { font: 800 40px/1.1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; color: var(--accent);
  background: var(--bg-2); border-radius: 16px; padding: 14px; user-select: all; font-variant-numeric: tabular-nums; }
.pin.wait { color: var(--muted); font-size: 18px; font-family: inherit; letter-spacing: 0; padding: 22px 14px; }
.small-note { font-size: 15px; margin: 10px 0 0; }
.small-note a { color: var(--accent); }
.qr { width: 200px; height: 200px; margin: 0 auto; padding: 10px; background: #fff; border-radius: 18px; border: 1px solid var(--line);
  display: grid; place-items: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr.wait::after { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #e9d8fd; border-top-color: #9333ea;
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { margin-top: 16px; font-weight: 700; min-height: 1.5em; }
.status.err { color: #b91c1c; }
.status.ok { color: var(--ok); }
@media (prefers-color-scheme: dark) { .status.err { color: #fca5a5; } }
.login-off { text-align: center; }
.login-off .off-ico { width: 56px; height: 56px; margin: 18px auto 6px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 26px; font-weight: 900; }
.login-off p { margin: 8px 0 0; }
.login-off .btn { width: 100%; margin-top: 18px; }
.demo-note { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }

/* --- 404 --- */
.notfound { min-height: calc(100vh - 69px); min-height: calc(100dvh - 69px); display: grid; place-items: center; padding: 32px 16px; text-align: center; }
.notfound .code { font-size: clamp(96px, 20vw, 160px); font-weight: 900; color: var(--accent); line-height: 1; letter-spacing: -.04em; }
.notfound h1 { font-size: clamp(26px, 4vw, 34px); margin: 12px 0 10px; }
.notfound p { max-width: 42ch; margin: 0 auto 24px; }
.notfound .cta { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .btn:active { transform: none; }
}
