/* ===== Токены (палитра и типографика в духе референса) ===== */
:root {
  --bg: #dedede;
  --card: #efefef;
  --card-2: #e3e3e3;
  --ink: #191816;
  --ink-2: #1e1e1d;
  --muted: #4b5563;
  --red: #b7394d;
  --red-grad: linear-gradient(#a3172c, #c53f53);
  --dark: #1b1b1a;
  --dark-2: #0e0e0e;
  --radius: 24px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
[id] { scroll-margin-top: 24px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.ico { width: 24px; height: 24px; flex-shrink: 0; }

.page { position: relative; overflow: hidden; padding-bottom: 32px; }
.column { width: min(var(--container), calc(100% - 44px)); margin-inline: auto; position: relative; }

/* ===== Кнопки ===== */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 13px 20px;
  border-radius: 100px; border: 1px solid var(--red);
  background: var(--red-grad); color: #f3eded;
  font-size: 18px; line-height: 21px; letter-spacing: -.36px; white-space: nowrap;
  transition: filter .2s, transform .2s, box-shadow .2s;
}
.cta:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(163, 23, 44, .65); }
.cta:active { filter: brightness(.95); transform: none; }
.cta-lg { min-height: 60px; padding: 16px 28px; font-size: 19px; }
.cta-wide { width: 100%; }

/* ===== Блок 1. Первый экран ===== */
.hero-card {
  position: relative; overflow: hidden;
  width: min(1440px, calc(100% - 24px));
  margin: 32px auto 0;
  padding: 48px 0 150px;
  border-radius: 32px;
  background:
    radial-gradient(1100px 700px at 0 0, rgba(240, 244, 246, .95), rgba(240, 244, 246, 0) 70%),
    linear-gradient(180deg, #b9dbe8 0%, #cfe6ee 55%, #dde9ec 100%);
}
.hero-img {
  position: absolute; top: 0; right: 0;
  height: 100%; width: auto; max-width: none;
  object-fit: cover;
  transform: scaleX(-1); /* пагода у правого края, небо — под текстом */
  -webkit-mask-image: linear-gradient(to right, #000 62%, transparent 100%);
          mask-image: linear-gradient(to right, #000 62%, transparent 100%);
  pointer-events: none; user-select: none;
}
.hero-inner { display: flex; flex-direction: column; gap: 72px; }

.header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; transition: opacity .2s; }
.brand img { flex-shrink: 0; border-radius: 50%; box-shadow: 0 6px 14px -8px rgba(14, 40, 48, .6); }
.header .brand span { overflow: hidden; text-overflow: ellipsis; }
.brand:hover { opacity: .8; }
.brand img { width: 48px; height: 48px; }
.brand span { font-size: 18px; line-height: 21px; letter-spacing: -.36px; color: var(--ink-2); white-space: nowrap; font-weight: 600; }
.nav { display: flex; gap: 32px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav a { font-size: 18px; line-height: 21px; letter-spacing: -.36px; color: var(--ink-2); white-space: nowrap; transition: color .2s; }
.nav a:hover { color: var(--red); }

.hero-body { display: flex; flex-direction: column; gap: 40px; max-width: 760px; }
.hero-text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(183, 57, 77, .25);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--ink); font-size: 15px; line-height: 20px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(183, 57, 77, .18); flex-shrink: 0; }
.hero-text h1 { font-size: 48px; line-height: 57px; font-weight: 600; color: #000; letter-spacing: -.5px; text-wrap: balance; }
.lead { font-size: 18px; line-height: 27px; color: #3f4753; font-weight: 400; max-width: 700px; }
.hero-action { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero-note { font-size: 15px; line-height: 20px; color: var(--muted); font-weight: 400; padding-left: 8px; }

/* Карточки под первым экраном */
.features {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: -88px;
}
.feature {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 28px 24px 30px;
  background: var(--card); border-radius: var(--radius);
  transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 12px 24px -16px rgba(25, 24, 22, .35); }
.feature-ico {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 4px;
  border-radius: 20px; background: var(--red-grad); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 10px 20px -12px rgba(163, 23, 44, .7);
}
.feature-ico .ico { width: 30px; height: 30px; }
.feature-title { font-size: 22px; line-height: 26px; font-weight: 600; color: var(--ink); }
.feature p { font-size: 16px; line-height: 21px; color: var(--muted); letter-spacing: -.2px; }

/* ===== Общие секции ===== */
.sections { display: flex; flex-direction: column; gap: 128px; margin-top: 128px; }
.block { display: flex; flex-direction: column; gap: 32px; }
.block h2, .block-head h2 { font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -.64px; color: var(--ink-2); }
.block-head { display: flex; flex-direction: column; gap: 10px; }
.block-head p { font-size: 18px; line-height: 27px; color: var(--muted); font-weight: 400; }

/* ===== Блок 2. Кому полезно (красная рамка с узором) ===== */
.frame {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--red) url("../img/pattern-waves.svg") 0 0 / 48px 24px repeat;
}
.audience {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: 18px; overflow: hidden;
}
.audience-photo { position: relative; height: 230px; margin: 10px 10px 0; border-radius: 14px; overflow: hidden; }
.audience-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.audience:hover .audience-photo img { transform: scale(1.04); }
.audience:nth-child(2) .audience-photo img { object-position: 50% 50%; }
.audience-body { display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 24px; }
.audience-body h3 { font-size: 24px; line-height: 29px; font-weight: 600; color: var(--ink); }
.audience-intro { font-size: 17px; line-height: 25px; color: var(--muted); font-weight: 400; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.tags li { padding: 5px 12px; border-radius: 100px; background: #fff; border: 1px solid #d9d9d9; font-size: 14px; line-height: 18px; color: var(--ink); }
.points { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.point {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px; background: #e2e2e2;
  transition: background-color .2s;
}
.point:hover { background: #dadada; }
.point .ico { color: var(--red); margin-top: 1px; }
.point p { font-size: 16px; line-height: 23px; color: var(--muted); font-weight: 400; }
.point b { color: var(--ink); font-weight: 500; }

/* ===== Блок 3. Что внутри бота ===== */
.tools {
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1fr 412px;
  grid-template-areas: "a b d" "c c d";
}
.tool-a { grid-area: a; } .tool-b { grid-area: b; } .tool-c { grid-area: c; } .tool-dark { grid-area: d; }
.tool {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 24px; border-radius: var(--radius); background: var(--card);
  transition: transform .25s, box-shadow .25s;
}
.tool:hover { transform: translateY(-4px); box-shadow: 0 12px 24px -16px rgba(25, 24, 22, .35); }
.tool-ico {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 100px;
  background: var(--red-grad); border: 1px solid var(--red); color: #fff;
}
.tool-ico .ico { width: 22px; height: 22px; }
.tool h3 { font-size: 24px; line-height: 28px; font-weight: 600; color: var(--ink); }
.tool p { font-size: 16px; line-height: 23px; color: var(--muted); font-weight: 400; letter-spacing: -.2px; }
.tool p b { color: var(--ink); font-weight: 600; }
.pill { padding: 5px 12px; border-radius: 100px; background: #e0e0e0; font-size: 14px; line-height: 18px; color: var(--ink); margin-top: -4px; }

.tool-dark { background: var(--dark-2); color: #fff; justify-content: space-between; gap: 24px; overflow: hidden; position: relative; }
.tool-dark::before {
  content: ""; position: absolute; inset: auto -30% -40% -30%; height: 70%;
  background: radial-gradient(closest-side, rgba(197, 63, 83, .35), transparent);
  pointer-events: none;
}
.tg { position: relative; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.tg-me {
  align-self: flex-end; margin-top: 6px;
  padding: 9px 14px; border-radius: 16px 16px 4px 16px;
  background: var(--red-grad); color: #fff; font-size: 15px; line-height: 20px; font-weight: 400;
}
.tg-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.tg-head img { width: 36px; height: 36px; border-radius: 50%; }
.tg-head b { display: block; font-size: 15px; line-height: 18px; font-weight: 600; }
.tg-head small { display: block; font-size: 13px; line-height: 16px; color: #9b9999; }
.tg-msg {
  align-self: flex-start; max-width: 85%;
  padding: 10px 14px; border-radius: 16px 16px 16px 4px;
  background: #222221; color: #e8e8e8; font-size: 15px; line-height: 20px; font-weight: 400;
}
/* Клавиатура бота: 3 кнопки в первом ряду, 2 во втором */
.tg-kb { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tg-kb span { grid-column: span 2; }
.tg-kb .tg-kb-half { grid-column: span 3; }
.tg-kb span {
  padding: 13px 8px; border-radius: 10px; text-align: center;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08);
  font-size: 15px; line-height: 20px; color: #f2f2f2;
}
.tool-dark .cta { position: relative; }

/* ===== Блок 4. FAQ ===== */
.faq { display: flex; flex-direction: column; gap: 16px; }
.faq-entry { background: var(--card-2); border-radius: 12px; }
.faq-q {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; padding: 16px; text-align: left;
  background: var(--card); border-radius: 12px;
  transition: padding .25s, background-color .2s;
}
.faq-q:hover { background: #e9e9e9; }
.faq-entry.open .faq-q { padding: 18px 24px; }
.faq-q span { font-size: 18px; line-height: 27px; letter-spacing: -.36px; color: var(--ink); }
.faq-q .ico { transition: transform .25s; }
.faq-entry.open .faq-q .ico, html:not(.js) .faq-q .ico { transform: scaleY(-1); }
/* Без JS все ответы раскрыты; с JS — свёрнуты, кроме .open */
.faq-a-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .25s; }
.faq-a-inner { min-height: 0; overflow: hidden; transition: visibility .25s; }
.js .faq-entry:not(.open) .faq-a-wrap { grid-template-rows: 0fr; }
.js .faq-entry:not(.open) .faq-a-inner { visibility: hidden; }
.faq-a { padding: 18px 24px; font-size: 18px; line-height: 27px; letter-spacing: -.2px; color: var(--muted); font-weight: 400; }

/* ===== Блок 5. Финальный CTA ===== */
.final {
  position: relative; overflow: hidden;
  display: flex; justify-content: flex-end; align-items: center;
  min-height: 380px; padding: 48px 64px;
  border-radius: var(--radius); background: var(--dark);
}
.final-img {
  position: absolute; inset: 0 auto 0 0; width: 64%; height: 100%;
  object-fit: cover; object-position: 30% 50%;
  -webkit-mask-image: linear-gradient(to right, #000 40%, transparent 100%);
          mask-image: linear-gradient(to right, #000 40%, transparent 100%);
  opacity: .9;
}
.final::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(27, 27, 26, 0) 0%, rgba(27, 27, 26, .35) 40%, rgba(27, 27, 26, .85) 55%);
  pointer-events: none;
}
.final-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; max-width: 540px; }
.final-text { display: flex; flex-direction: column; gap: 16px; color: #fff; }
.final-text h2 { font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -.64px; }
.final-text p { font-size: 18px; line-height: 25px; opacity: .8; font-weight: 400; }

/* ===== Блок 6. Подвал ===== */
.footer {
  margin-top: 64px; padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
  background: var(--card); border-radius: var(--radius);
}
.footer-top { display: flex; align-items: center; gap: 24px 32px; flex-wrap: wrap; }
.footer .brand img { width: 40px; height: 40px; }
.footer-tagline { flex: 1 1 260px; font-size: 16px; line-height: 22px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { font-size: 16px; line-height: 22px; color: var(--ink); border-bottom: 1px solid rgba(25, 24, 22, .25); transition: color .2s, border-color .2s; }
.footer-links a:hover { color: var(--red); border-color: var(--red); }
.disclaimer { padding-top: 20px; border-top: 1px solid #dcdcdc; font-size: 14px; line-height: 20px; color: var(--muted); font-weight: 400; }
.copyright { font-size: 14px; line-height: 20px; color: var(--muted); font-weight: 400; }

/* ===== Страницы документов ===== */
.legal-page { padding-top: 32px; }
.legal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0 32px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: var(--ink); transition: color .2s; }
.back-link:hover { color: var(--red); }
.back-link .ico { transform: rotate(90deg); width: 20px; height: 20px; }
.legal {
  padding: 40px 48px; border-radius: var(--radius); background: var(--card);
  color: var(--muted); font-weight: 400; font-size: 17px; line-height: 26px;
}
.legal h1 { overflow-wrap: anywhere; hyphens: auto; font-size: 36px; line-height: 42px; font-weight: 600; color: var(--ink); margin-bottom: 8px; letter-spacing: -.5px; }
.legal .updated { font-size: 15px; color: var(--muted); margin-bottom: 28px; }
.legal h2 { font-size: 22px; line-height: 28px; font-weight: 600; color: var(--ink); margin: 32px 0 12px; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 12px; }
.legal ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal a { color: var(--red); border-bottom: 1px solid rgba(183, 57, 77, .3); }
.legal mark { background: #f6e2a6; color: var(--ink); padding: 0 4px; border-radius: 4px; }

/* ===== Адаптив ===== */
@media (max-width: 1180px) {
  .hero-text h1 { font-size: 42px; line-height: 50px; }
  .hero-body { max-width: 590px; }
  .hero-img { right: -60px; }
  .tools { grid-template-columns: 1fr 1fr 360px; }
}

@media (max-width: 1023px) {
  .nav { display: none; }
  .hero-card { margin-top: 12px; padding: 24px 0 300px; border-radius: 24px; }
  .hero-inner { gap: 40px; }
  .hero-img {
    top: auto; bottom: 0; right: -20px; height: 380px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%), linear-gradient(to right, #000 50%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-image: linear-gradient(to bottom, transparent 0%, #000 35%), linear-gradient(to right, #000 50%, transparent 100%);
            mask-composite: intersect;
  }
  .hero-body { max-width: none; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: -72px; }
  .sections { gap: 80px; margin-top: 80px; }
  .frame { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr 1fr; grid-template-areas: "a b" "c c" "d d"; }
  .final { justify-content: flex-start; align-items: flex-end; min-height: 0; padding: 220px 32px 32px; }
  .final-img { width: 100%; height: 300px; inset: 0 0 auto 0; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%); mask-image: linear-gradient(to bottom, #000 40%, transparent 100%); }
  .final::after { background: linear-gradient(180deg, rgba(27, 27, 26, 0) 0%, rgba(27, 27, 26, .4) 45%, rgba(27, 27, 26, .95) 70%); }
}

@media (max-width: 680px) {
  .column { width: calc(100% - 32px); }
  .hero-card { width: calc(100% - 16px); margin-top: 8px; padding: 20px 0 250px; }
  .hero-img { height: 320px; }
  .header { min-height: 44px; }
  .brand { gap: 8px; }
  .brand img { width: 38px; height: 38px; }
  .brand span { font-size: 15px; }
  .header .brand span, .legal-header .brand span { white-space: normal; overflow: visible; line-height: 17px; }
  .brand-l2 { display: block; }
  .header .cta { min-height: 42px; padding: 9px 14px; font-size: 15px; gap: 6px; }
  .header .cta .ico { width: 18px; height: 18px; }
  .badge { font-size: 13px; line-height: 17px; padding: 7px 12px 7px 10px; }
  .hero-text h1 { font-size: 30px; line-height: 36px; letter-spacing: -.3px; }
  .lead { font-size: 16px; line-height: 24px; }
  .hero-action { align-items: stretch; }
  .cta-lg { white-space: normal; text-align: center; font-size: 17px; line-height: 21px; padding: 14px 20px; }
  .hero-note { padding-left: 0; text-align: center; font-size: 14px; }
  .features { margin-top: -64px; gap: 10px; }
  .feature { padding: 18px 12px 20px; gap: 8px; }
  .feature-ico { width: 48px; height: 48px; border-radius: 15px; }
  .feature-ico .ico { width: 24px; height: 24px; }
  .feature-title { font-size: 17px; line-height: 21px; }
  .feature p { font-size: 14px; line-height: 18px; }
  .sections { gap: 64px; margin-top: 64px; }
  .block { gap: 20px; }
  .block h2, .block-head h2, .final-text h2 { font-size: 25px; line-height: 31px; }
  .block-head p { font-size: 16px; line-height: 24px; }
  .frame { padding: 8px; gap: 8px; }
  .audience-photo { height: 190px; margin: 8px 8px 0; }
  .audience-body { padding: 18px 14px 16px; }
  .audience-body h3 { font-size: 21px; line-height: 26px; }
  .audience-intro { font-size: 16px; line-height: 24px; }
  .point { padding: 12px; gap: 10px; }
  .point p { font-size: 15px; line-height: 22px; }
  .tools { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d"; gap: 12px; }
  .tool { padding: 20px; }
  .tool h3 { font-size: 21px; line-height: 26px; }
  .faq { gap: 10px; }
  .faq-q span, .faq-a { font-size: 16px; line-height: 23px; }
  .faq-entry.open .faq-q, .faq-a { padding: 16px; }
  .final { padding: 190px 20px 24px; }
  .final-img { height: 260px; }
  .final-text p { font-size: 16px; line-height: 23px; }
  .final-body { gap: 24px; }
  .final .cta { width: 100%; }
  .cta-wide, .final .cta { white-space: normal; text-align: center; }
  .footer { padding: 22px 18px; margin-top: 48px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-tagline { flex: none; }
  .footer-links { flex-direction: column; gap: 10px; }
  .feature:hover, .tool:hover { transform: none; }
  .legal { padding: 24px 18px; font-size: 16px; line-height: 24px; }
  .legal h1 { font-size: 27px; line-height: 33px; }
  .legal h2 { font-size: 19px; line-height: 25px; margin-top: 26px; }
}

@media (max-width: 359px) {
  .header .brand span, .legal-header .brand span { display: none; }
}

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