/* HatkaTut — цвета и формы Mini App бота: зелёная кнопка, жёлтый бобёр, серый фон Telegram. */
@font-face {
  font-family: 'Unbounded'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('fonts/unbounded-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('fonts/unbounded-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green: #03977b;
  --green-dark: #037a63;
  --mint: #e1f4ef;
  --yellow: #ffdf3a;
  --ink: #0b2236;
  --text: #3a4a57;
  --muted: #5d6875;
  --page: #f1f2f4;
  --card: #fff;
  --line: #dfe3e8;
  --r-s: 12px;
  --r-m: 14px;
  --r-l: 28px;
  --display: 'Unbounded', system-ui, sans-serif;
  --body: -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
main > section { scroll-margin-top: 96px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 17px/1.55 var(--body); }
img, svg { display: block; }
a { color: var(--green-dark); }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: var(--r-s); background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }

.top-in, main > section, .foot { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* шапка — приклеена к верху и едет при прокрутке: логотип, аренда / покупка, разделы страницы, кнопка */
.top { position: sticky; top: 0; z-index: 15; background: var(--yellow); transition: background-color 0.2s; }
/* первый экран ушёл из-под шапки — шапка светлая и полупрозрачная, чтобы жёлтая полоса не ехала по всей странице */
.top.light { background: rgba(241, 242, 244, 0.92); backdrop-filter: blur(10px); }
@media (prefers-reduced-motion: reduce) { .top { transition: none; } }
.top .deal { background: rgba(11, 34, 54, 0.08); }
.top-in { display: flex; align-items: center; gap: 20px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ink); text-decoration: none; font: 700 22px/1 var(--display); }
.brand img { width: 56px; height: 56px; border-radius: 50%; }
.top .deal { margin: 0 0 0 12px; }
.cta.cta-top { flex-shrink: 0; margin-left: auto; padding: 12px 18px; font-size: 15px; box-shadow: 0 4px 0 var(--green-dark); }

/* точки справа — разделы страницы; подпись видна только при наведении и фокусе */
.dots { position: fixed; right: max(8px, calc((100vw - 1120px) / 2 - 48px)); top: 50%; z-index: 12; display: flex; flex-direction: column; gap: 4px; transform: translateY(-50%); }
.dots a { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.dots a::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: rgba(11, 34, 54, 0.28); transition: transform 0.15s, background 0.15s; }
.dots a:hover::before { background: rgba(11, 34, 54, 0.55); }
.dots a[aria-current]::before { background: var(--green); transform: scale(1.4); }
.dots span { position: absolute; right: 34px; padding: 5px 10px; border-radius: var(--r-s); background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.dots a:hover span, .dots a:focus-visible span { opacity: 1; }

/* первый экран: жёлтое полотно бобра, слева текст, справа два экрана бота */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end;
  --gutter: max(28px, calc((100% - 1120px) / 2 + 56px));
  position: relative; z-index: 1; padding: 36px var(--gutter) 0; border-radius: 0 0 var(--r-l) var(--r-l); background: var(--yellow); overflow: hidden;
}
main > .hero { width: 100%; }
.hero-text { align-self: center; padding-bottom: 56px; }

/* аренда / покупка — две страницы; переключатель — обычные ссылки */
.deal { display: inline-flex; gap: 0; padding: 3px; border-radius: 999px; background: rgba(11, 34, 54, 0.08); }
.deal a { min-width: 112px; padding: 13px 20px; border-radius: 999px; color: var(--ink); font: 600 16px/18px var(--body); text-align: center; text-decoration: none; }
.deal a:hover { background: rgba(11, 34, 54, 0.06); }
.deal a[aria-current='page'] { background: var(--green); color: #fff; }

.hero h1 { font: 700 clamp(30px, 3.6vw, 44px)/1.1 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.sub { max-width: 34em; margin: 16px 0 26px; color: var(--text); }

.cta {
  display: inline-block; padding: 18px 34px; border-radius: var(--r-m); background: var(--green); color: #fff;
  font: 700 19px/1 var(--body); text-decoration: none; box-shadow: 0 6px 0 var(--green-dark);
  transition: transform 0.08s, box-shadow 0.08s;
}
.cta:hover { background: #04a586; }
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--green-dark); }
.proof { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 18px; color: var(--text); font-size: 15px; font-weight: 600; }
.proof span::before { content: '✓ '; color: var(--green-dark); }

/* два телефона: лента Mini App и чат с карточкой; телефоны «вырастают» из жёлтого полотна */
.screens { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 560px; }
.phone { width: 300px; padding: 12px 12px 0; border-radius: 40px 40px 0 0; background: var(--ink); }
.phone-feed { position: absolute; left: 0; bottom: 0; transform: translateY(32px) rotate(-4deg); transform-origin: bottom left; opacity: 0.96; }
.phone-chat { position: relative; margin-left: 120px; }

.app { display: flex; flex-direction: column; gap: 8px; height: 470px; padding: 14px 12px; border-radius: 30px 30px 0 0; background: var(--page); overflow: hidden; }
.app-head { display: flex; align-items: center; gap: 6px; font: 700 18px/1 var(--display); }
.app-head i { width: 4px; height: 16px; border-radius: 2px; background: var(--yellow); }
.app-seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 2px; border-radius: 999px; background: #fff; font-size: 11px; font-weight: 600; }
.app-seg b { padding: 5px 10px; border-radius: 999px; background: var(--green); color: #fff; }
.app-seg span { padding: 5px 10px; color: var(--muted); }
.f-card { border-radius: var(--r-s); background: #fff; overflow: hidden; }
.f-ph { position: relative; height: 62px; background: linear-gradient(135deg, #d6e6ee, #b9cfdc); }
.f-ph.f-new::after { content: 'Новое'; position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 999px; background: var(--yellow); font-size: 10px; font-weight: 700; }
.f-body { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 10px; font-size: 11.5px; }
.f-body b { font-size: 15px; }
.f-place { color: var(--muted); }
.f-est { font-weight: 600; }

.chat { display: flex; flex-direction: column; gap: 10px; height: 520px; padding: 0 12px 20px; border-radius: 30px 30px 0 0; background: linear-gradient(160deg, #d9ece2, #c3dbcf); }
.chat-head { display: flex; align-items: center; gap: 10px; margin: 0 -12px 6px; padding: 14px 16px; border-radius: 30px 30px 0 0; background: #fff; }
.chat-head img { border-radius: 50%; }
.chat-head b { display: block; font-size: 15px; line-height: 1.2; }
.chat-head span { color: var(--muted); font-size: 13px; }
.msg { max-width: 94%; padding: 10px 12px 8px; border-radius: 16px 16px 16px 4px; background: #fff; font-size: 13px; line-height: 1.45; box-shadow: 0 1px 1px rgba(11, 34, 54, 0.12); }
.msg time { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; text-align: right; }
.m-title { margin-bottom: 4px; font-weight: 600; }
.m-title u { color: #2a7ab0; text-decoration: none; }
.m-est { font-weight: 600; }
.m-dup { margin-top: 4px; color: #2a7ab0; }
.reply-to { display: block; margin-bottom: 4px; padding-left: 8px; border-left: 3px solid var(--green); color: var(--green-dark); font-size: 12px; font-weight: 600; }

/* единственная анимация: карточка и ответ приходят в чат при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .card-msg { animation: arrive 0.5s 0.4s both cubic-bezier(0.2, 0.9, 0.3, 1.2); }
  .reply { animation: arrive 0.5s 1.6s both cubic-bezier(0.2, 0.9, 0.3, 1.2); }
  @keyframes arrive { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
}

/* «Зачем, если есть сайты» — список, а не карточки */
main > section:not(.hero) { padding-top: 72px; }
main > .why {
  --gutter: max(28px, calc((100% - 1120px) / 2 + 56px));
  width: 100%; margin-top: calc(-1 * var(--r-l)); padding: calc(64px + var(--r-l)) var(--gutter) 64px;
  border-radius: 0 0 var(--r-l) var(--r-l); background: var(--card);
}
main h2 { font: 700 clamp(26px, 3vw, 36px)/1.15 var(--display); letter-spacing: -0.01em; }
.why-sub { max-width: 36em; margin-top: 12px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; margin: 36px 0 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 44px 1fr; align-content: start; column-gap: 14px; padding: 22px 0; border-top: 1px solid var(--line); }
.facts .ico { grid-row: span 2; color: var(--green); }
.facts h3 { font-size: 19px; line-height: 1.3; }
.facts p { margin-top: 6px; color: var(--text); }

/* шаги — настоящая последовательность, поэтому с номерами */
.steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding: 24px; border-radius: var(--r-m); background: var(--card); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%; background: var(--yellow); font: 700 18px/1 var(--display);
}
.steps h3 { font-size: 19px; }
.steps p { margin-top: 6px; color: var(--text); }

/* собственникам */
main > .owners { display: grid; grid-template-columns: 140px 1fr; gap: 32px; align-items: start; margin-top: 72px; padding: 44px 48px; border-radius: var(--r-l); background: var(--green); color: #fff; }
.owners img { width: 140px; height: 140px; border-radius: 50%; }
.owners p { max-width: 38em; margin-top: 10px; color: rgba(255, 255, 255, 0.9); }
.owners ul { margin: 14px 0 22px; padding: 0; list-style: none; }
.owners li { position: relative; padding: 4px 0 4px 26px; }
.owners li::before { content: '✓'; position: absolute; left: 0; color: var(--yellow); font-weight: 700; }
.cta-quiet { padding: 15px 26px; font-size: 17px; }
.cta.cta-light { padding: 15px 26px; background: #fff; color: var(--green-dark); font-size: 17px; box-shadow: 0 5px 0 rgba(11, 34, 54, 0.25); }
.cta.cta-light:hover { background: var(--mint); }

/* обзор рынка в канале */
.channel { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.channel p { max-width: 36em; margin-top: 12px; color: var(--text); }
.channel ul { margin: 12px 0 24px; padding-left: 20px; color: var(--text); }
.channel li { padding: 3px 0; }
.post-wrap { margin: 0; }
.post { padding: 16px 20px 18px; border-radius: 18px; background: var(--card); box-shadow: 0 1px 2px rgba(11, 34, 54, 0.12), 0 12px 32px rgba(11, 34, 54, 0.08); }
.post-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.post-head img { border-radius: 50%; }
.post-head b { display: block; font-size: 15px; line-height: 1.2; }
.post-head span { color: var(--muted); font-size: 13px; }
.channel .post p { max-width: none; margin: 0; }
.post-title { font-size: 16px; font-weight: 700; }
.channel .post .post-period { color: var(--muted); font-size: 13px; }
.channel .post .post-big { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 14px 0 6px; padding: 12px 14px; border-radius: var(--r-s); background: var(--mint); color: var(--ink); }
.post-big b { font: 700 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.post-big span { font-size: 14px; }
.post table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.post th, .post td { padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.post td { text-align: right; white-space: nowrap; font-weight: 600; }
.post td:last-child:not([colspan]) { width: 1%; padding-left: 10px; }
.post td.m2 { padding-left: 10px; color: var(--muted); font-size: 12px; font-weight: 400; }
.post .t-head th, .post .t-head td { padding-top: 14px; border-bottom: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.chg { padding: 2px 7px; border-radius: 999px; font-size: 12px; font-style: normal; font-weight: 700; }
.chg.up { background: #dff3e9; color: #037a63; }
.chg.down { background: #fde8e6; color: #b3261e; }
.post-big .chg { padding: 4px 10px; font-size: 13px; }
.post-big .chg.up { background: var(--green); color: #fff; }
.post-big .chg.down { background: #b3261e; color: #fff; }
.sub2 { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 400; }
.channel .post .post-owners { margin-top: 12px; color: var(--text); font-size: 14px; }
.post-wrap figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: right; }

/* бесплатно и с подпиской */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.plan { padding: 26px 28px; border-radius: var(--r-m); background: var(--card); }
.plan-paid { background: var(--green); color: #fff; }
.plan-paid .price { color: #fff; }
.plan-paid .price small { color: rgba(255, 255, 255, 0.8); }
.plan.plan-paid li::before { color: var(--yellow); }
.plan h3 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; font: 700 20px/1.2 var(--display); }
.price { color: var(--green-dark); font: 700 24px/1 var(--display); white-space: nowrap; }
.price small { color: var(--muted); font: 600 14px/1 var(--body); }
.plan ul { margin: 14px 0 0; padding: 0; list-style: none; }
.plan li { position: relative; padding: 7px 0 7px 26px; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.promo { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 16px 20px; border-radius: var(--r-m); background: var(--yellow); font-weight: 600; }
.promo img { flex-shrink: 0; border-radius: 50%; }

/* вопросы */
.faq { max-width: 820px; }
.faq h2 { margin-bottom: 20px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 20px 40px 20px 0; font-size: 18px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; color: var(--green); font: 400 30px/1 var(--body); }
.faq details[open] summary::after { content: '−'; }
.faq details p { max-width: 40em; margin-bottom: 20px; color: var(--text); }

/* финал */
.final { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.final img { width: 180px; height: 180px; border-radius: 50%; }
.final-line { max-width: 22em; font: 700 clamp(22px, 2.6vw, 30px)/1.25 var(--display); text-wrap: balance; }
.other { color: var(--muted); font-size: 15px; }

/* на телефоне — кнопка, прилипшая к низу экрана */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(241, 242, 244, 0.94); backdrop-filter: blur(8px); box-shadow: 0 -1px 0 var(--line); }
.sticky .cta { display: block; padding: 16px; text-align: center; }

.foot { padding: 64px 0 40px; color: var(--muted); font-size: 15px; text-align: center; }
.foot p { margin: 4px 0; }

@media (min-width: 901px) {
  .sticky { display: none !important; }
}
}
@media (max-width: 1080px) {
  .phone-feed { display: none; }
  .phone-chat { margin-left: 0; }
}
@media (max-width: 900px) {
  .hero { --gutter: 24px; grid-template-columns: 1fr; gap: 8px; padding: 28px var(--gutter) 0; }
  .hero-text { padding-bottom: 28px; }
  .screens { min-height: 0; }
  .phone-chat { width: min(340px, 100%); }
  .chat { height: 430px; }
  main > .why { --gutter: 24px; padding: calc(48px + var(--r-l)) var(--gutter) 48px; }
  .facts { grid-template-columns: 1fr; }
  .steps ol, .plan-grid { grid-template-columns: 1fr; }
  main > .owners { grid-template-columns: 1fr; gap: 16px; padding: 32px 24px; }
  .owners img { width: 96px; height: 96px; }
  .channel { grid-template-columns: 1fr; gap: 24px; }
  .cta.cta-top { display: none; }
  .foot { padding-bottom: 110px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .top-in, main > section, .foot { width: calc(100% - 24px); }
  .top-in { gap: 8px; padding: 8px 0; }
  .brand { gap: 0; }
  .brand img { width: 48px; height: 48px; }
  .brand span { display: none; }
  .top .deal { flex: 1; margin-left: 4px; }
  .deal a { flex: 1; min-width: 0; padding: 13px 8px; }
  .hero { padding-top: 24px; }
  .final img { width: 140px; height: 140px; }
  .dots { display: none; }
  .hero h1 { font-size: clamp(25px, 7.2vw, 30px); }
  .sub { margin: 10px 0 18px; font-size: 15.5px; line-height: 1.45; }
  .cta { display: block; text-align: center; }
  .cta-mid, .cta-quiet { display: block; }
}

/* Плавный переход аренда ↔ покупка (это две страницы): плашка переключателя переезжает; текст первого экрана и
   экраны бота сначала гаснут, потом новое проявляется (только прозрачность, без сдвига); остальная страница меняется сразу.
   Где браузер не умеет — обычный переход. */
@view-transition { navigation: auto; }
.top .deal a[aria-current='page'] { view-transition-name: deal-pill; }
.hero-text { view-transition-name: hero-text; }
.screens { view-transition-name: hero-screens; clip-path: inset(-200px -200px 0 -200px); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
/* текст и экраны не переезжают между местами — только гаснут и проявляются там, где стоят */
::view-transition-group(hero-text), ::view-transition-group(hero-screens) { animation: none; }
::view-transition-group(deal-pill) { animation-duration: 0.28s; animation-timing-function: cubic-bezier(0.3, 0.8, 0.3, 1); }
::view-transition-old(deal-pill), ::view-transition-new(deal-pill) { animation-duration: 0.28s; }
::view-transition-old(hero-text), ::view-transition-old(hero-screens) { animation: vt-out 0.12s ease-out both; }
::view-transition-new(hero-text), ::view-transition-new(hero-screens) { animation: vt-in 0.28s 0.06s ease-in-out both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
/* пришли переключателем — сообщения в чате уже на месте, без повторного «прилёта» */
.vt .card-msg, .vt .reply { animation: none; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
