:root {
  --sheet: #eef0f2;
  --paper: #ffffff;
  --ink: #15181c;
  --ink-soft: #4b535c;
  --line: #d3d8dd;
  --triangle: #ff5a1f;
  --good: #2e7d5b;
  --mid: #d9a400;
  --bad: #c62828;
  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 36rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
}
a { color: inherit; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--triangle); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 0.9rem + 2vw, 2.25rem); max-width: 22ch; margin-bottom: 1.5rem; overflow-wrap: anywhere; }
h3 { font-size: 1.05rem; font-weight: 500; margin-bottom: 0.4rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }
ul, ol { margin: 0; padding: 0; }

main > section, .top, .foot {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}
main > section { padding-block: 3.5rem; border-top: 1px solid var(--line); }
main > section:first-child { border-top: 0; }

.top { display: flex; align-items: center; justify-content: space-between; padding-block: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-weight: 500; color: var(--ink-soft); }
@media (max-width: 30rem) { .brand-sub { display: none; } }
.brand-mark { width: 1.5rem; height: 1.5rem; border-radius: 0.4rem; background: var(--ink); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 0.3rem; border: 0.18rem solid var(--triangle); border-radius: 0.1rem; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.top-link { font-weight: 600; text-decoration: none; color: var(--ink-soft); border-bottom: 1.5px solid var(--line); padding-bottom: 1px; }
.top-link:hover { color: var(--ink); border-color: var(--ink); }

.hero { display: grid; gap: 2.5rem; padding-top: 2rem; align-items: center; }
.hero h1 { font-size: clamp(1.5rem, 0.6rem + 4vw, 3.4rem); max-width: 15ch; overflow-wrap: anywhere; }
.lead { font-size: 1.15rem; color: var(--ink-soft); margin-top: 1.25rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.cta-note { color: var(--ink-soft); font-size: 0.95rem; }
.button {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--ink); color: var(--paper); padding: 0.95rem 1.5rem; border-radius: 0.6rem;
  border: 2px solid var(--ink); transition: background 120ms ease, color 120ms ease;
}
.button:hover { background: var(--triangle); border-color: var(--triangle); }

/* Диалог с ботом — главный элемент страницы */
.chat {
  margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 1.25rem;
  padding: 1rem; display: grid; gap: 0.75rem; box-shadow: 0 24px 60px -30px rgba(21, 24, 28, 0.35);
  max-width: 26rem; justify-self: center; width: 100%;
}
.chat-head { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; padding: 0.25rem 0.5rem 0.75rem; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); position: relative; flex: none; }
.chat-avatar::after { content: ""; position: absolute; inset: 0.45rem; background: var(--triangle); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.msg { padding: 0.75rem 0.9rem; border-radius: 1rem; font-size: 0.95rem; line-height: 1.45; max-width: 92%; }
.msg.me { background: var(--sheet); justify-self: end; border-bottom-right-radius: 0.3rem; }
.msg.bot { background: #f6f7f8; border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: 0.3rem; }
.msg strong { display: block; margin-bottom: 0.4rem; }
.msg ul { list-style: none; display: grid; gap: 0.25rem; }
.msg li::before { content: "• "; color: var(--triangle); }
.photos { display: flex; gap: 0.35rem; margin-bottom: 0.5rem; }
.photos img { width: 3.6rem; height: 2.7rem; object-fit: cover; border-radius: 0.4rem; display: block; }
.range { position: relative; display: grid; grid-template-columns: 1fr auto; padding: 0.35rem 0 0.55rem; font-size: 0.92rem; }
.range-name { font-weight: 600; }
.range-sum { font-variant-numeric: tabular-nums; }
.range i { grid-column: 1 / -1; display: block; height: 0.45rem; border-radius: 0.3rem; background: var(--line); margin-top: 0.3rem; position: relative; }
.range i::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--l); width: var(--w); border-radius: 0.3rem; background: var(--c); }
.range.good { --c: var(--good); --l: 18%; --w: 28%; }
.range.mid { --c: var(--mid); --l: 38%; --w: 36%; }
.range.bad { --c: var(--bad); --l: 60%; --w: 40%; }
.msg-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0.5rem 0 0; }
.chat-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chat-actions span { font-size: 0.85rem; font-weight: 600; border: 1.5px solid var(--ink); border-radius: 0.5rem; padding: 0.4rem 0.7rem; }

.steps ol { list-style: none; counter-reset: step; display: grid; gap: 1.5rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; }
.steps li::before {
  content: counter(step); font-family: var(--display); font-weight: 700; font-size: 1.6rem;
  color: var(--triangle); line-height: 1; padding-top: 0.15rem;
}
.steps h3 { margin: 0.35rem 0 0.4rem; }
.steps li > p { grid-column: 2; margin-bottom: 0; color: var(--ink-soft); }

.story-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 2rem; }
.story-photos figure { margin: 0; }
.story-photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.6rem; display: block; }
.story-photos figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.4rem; }
.story-grid { display: grid; gap: 2rem; }
.story-big { font-family: var(--display); font-weight: 500; font-size: clamp(1.2rem, 0.8rem + 1.8vw, 2rem); line-height: 1.25; max-width: 18ch; }
.story-big b { color: var(--triangle); font-weight: 700; }
.story-text p { color: var(--ink-soft); }

.facts-grid { display: grid; gap: 2rem; }
.facts ul { list-style: none; display: grid; gap: 0.5rem; max-width: var(--measure); }
.facts li { padding-left: 1.4rem; position: relative; color: var(--ink-soft); }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--good); }
.facts-grid > div:last-child li::before { background: var(--line); border: 2px solid var(--ink-soft); box-sizing: border-box; }

.final h2 { max-width: 26ch; }
.cities { color: var(--ink-soft); font-size: 0.95rem; margin-top: 1rem; }

.foot { padding-block: 2rem 3rem; color: var(--ink-soft); font-size: 0.92rem; border-top: 1px solid var(--line); }
.foot p { max-width: 48rem; }

@media (min-width: 52rem) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; padding-top: 3rem; padding-bottom: 4.5rem; }
  .chat { justify-self: end; }
  .steps ol { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .steps li { grid-template-columns: 1fr; }
  .steps li > p { grid-column: auto; }
  .steps h3 { margin-top: 0.6rem; }
  .story-grid, .facts-grid { grid-template-columns: 1fr 1.3fr; gap: 3rem; }
  .story-photos { gap: 1rem; margin-bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
