/* =====================================================================
   СамуиХата — стили.
   Стиль: светлый «журнальный» лендинг в палитре Telegram.
   Фирменные приёмы: серифные заголовки (Prata), арочные фото-маски,
   стикер-бейджи, бегущая строка, бенто-сетка каталога.
   ===================================================================== */

:root {
  /* палитра Telegram + глубокая «чернильная» синь */
  --tg:       #2AABEE;
  --tg-2:     #229ED9;
  --tg-deep:  #0088CC;
  --grad:     linear-gradient(118deg, #2AABEE 0%, #1898DD 55%, #0088CC 100%);
  --ink:      #0A2B3D;
  --ink-2:    #0E3A52;
  --ink-deep: #071E2C;
  --muted:    #54718A;
  --paper:    #F6FAFD;
  --white:    #FFFFFF;
  --tint:     #E4F2FC;
  --tint-2:   #D3E9F8;
  --line:     #DBE9F3;
  --papaya:   #FF8F4D; /* точечный тёплый акцент */
  --ok:       #31B545;

  --serif: 'Prata', 'Georgia', serif;
  --sans:  'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 30px;
  --arch: 999px 999px 26px 26px; /* фирменная арка */
  --shadow:    0 10px 34px rgba(10, 60, 90, .10);
  --shadow-lg: 0 24px 60px rgba(8, 50, 80, .16);
  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--tg-deep); text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }

h1, h2, h3 { font-weight: 600; }
.serif { font-family: var(--serif); font-weight: 400; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px;
  border: 0; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-tg {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 136, 204, .35);
}
.btn-tg:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 136, 204, .45); }
.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--tg); color: var(--tg-deep); }
.btn-xl { padding: 19px 38px; font-size: 18px; }
.i-tg { flex: none; }

/* ---------- Шапка ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246, 250, 253, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-head.scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(10, 60, 90, .07); }
.head-in { display: flex; align-items: center; gap: 28px; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  border-radius: 14px 14px 14px 4px; /* «пузырь» сообщения */
  box-shadow: 0 6px 16px rgba(0, 136, 204, .3);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { font-family: var(--serif); font-size: 23px; letter-spacing: .2px; }
.brand-text em { font-style: normal; color: var(--tg-deep); }

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink); font-weight: 600; font-size: 15.5px; position: relative; padding: 6px 0; }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--grad); border-radius: 2px;
  transition: right .22s ease;
}
.nav a:hover::after { right: 0; }
.head-cta { display: flex; align-items: center; gap: 14px; }
.head-cta .btn-tg { padding: 11px 20px; font-size: 15px; }

.burger { display: none; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.hero::before {
  content: ''; position: absolute; inset: -20% -30% auto;
  height: 130%;
  background:
    radial-gradient(46% 60% at 84% 18%, rgba(42, 171, 238, .16), transparent 70%),
    radial-gradient(36% 48% at 8% 82%, rgba(0, 136, 204, .10), transparent 70%);
  pointer-events: none;
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.hero-over {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--white); border: 1.5px solid var(--line);
  padding: 8px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--tg-deep);
  box-shadow: var(--shadow);
}
.hero-over .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(49, 181, 69, .18); }

.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.14;
  margin: 22px 0 18px;
  letter-spacing: -.5px;
}
.hero h1 .hl { color: var(--tg-deep); white-space: nowrap; }
.hero-sub { font-size: 18.5px; color: var(--muted); max-width: 46ch; margin-bottom: 30px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-trust { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-trust div { display: flex; align-items: baseline; gap: 8px; }
.hero-trust b { font-family: var(--serif); font-weight: 400; font-size: 27px; color: var(--ink); }
.hero-trust span { font-size: 14px; color: var(--muted); max-width: 15ch; line-height: 1.35; }

/* арочное фото + стикеры */
.hero-visual { position: relative; }
.hero-photo {
  border-radius: var(--arch);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--white);
}
.hero-photo img { width: 100%; height: 560px; object-fit: cover; }

.sticker {
  position: absolute;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 12px 18px;
  font-weight: 700;
  animation: floaty 5s ease-in-out infinite;
}
.sticker small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.sticker .big { font-family: var(--serif); font-size: 22px; }
.sticker-price { left: -26px; top: 54px; transform: rotate(-4deg); }
.sticker-price .big { color: var(--tg-deep); }
.sticker-chat {
  left: 8px; bottom: -24px;
  display: flex; align-items: center; gap: 12px;
  border-radius: 20px 20px 20px 6px;
  padding: 13px 20px 13px 14px;
  animation-delay: 2.1s;
}
.sticker-chat .ava {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--grad); color: #fff; display: grid; place-items: center;
}
.sticker-chat p { font-size: 14px; font-weight: 600; line-height: 1.35; }
.sticker-chat small { color: var(--ok); font-weight: 700; }
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

/* ---------- Бегущая строка ---------- */
.ticker {
  margin: 46px 0 0;
  border-block: 1.5px solid var(--line);
  background: var(--white);
  overflow: hidden;
  white-space: nowrap;
  padding: 15px 0;
}
.ticker-track { display: inline-flex; gap: 0; animation: ticker 34s linear infinite; }
.ticker span {
  font-family: var(--serif); font-size: 17px; color: var(--ink-2);
  padding: 0 18px; display: inline-flex; align-items: center; gap: 36px;
}
.ticker span::after { content: '✦'; color: var(--tg); font-size: 13px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Общие секции ---------- */
.section { padding: 84px 0; }
.section-head { max-width: 720px; margin-bottom: 46px; }
.section-over {
  font-size: 13.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--tg-deep); margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.section-over::before { content: ''; width: 26px; height: 2px; background: var(--grad); border-radius: 2px; }
.section h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px); line-height: 1.18; letter-spacing: -.3px;
}
.section-sub { color: var(--muted); font-size: 18px; margin-top: 14px; }

/* ---------- Каталог: бенто-сетка ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--tint-2); }
.card-wide { grid-column: span 2; }
.card-media { position: relative; overflow: hidden; }
.card-media img { width: 100%; height: 240px; object-fit: cover; transition: transform .5s ease; }
.card-wide .card-media img { height: 300px; }
.card:hover .card-media img { transform: scale(1.045); }
.card-tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255, 255, 255, .93);
  border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 800; color: var(--ink-2);
  backdrop-filter: blur(4px);
}
.card-price {
  position: absolute; right: 14px; bottom: 14px;
  background: var(--ink); color: #fff;
  border-radius: 14px; padding: 8px 15px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow);
}
.card-price b { font-family: var(--serif); font-weight: 400; font-size: 20px; color: #9ADCFF; }
.card-price small { display: block; font-size: 11px; opacity: .68; font-weight: 500; }
.card-body { padding: 28px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin-bottom: 8px; }
.card-body p { font-size: 15px; color: var(--muted); flex: 1; }
.card-cta {
  margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--tint);
  color: var(--tg-deep); font-weight: 800; font-size: 15px;
  border-radius: 999px; padding: 13px 18px;
  transition: background .2s, color .2s, box-shadow .2s;
}
.card-cta svg { transition: transform .2s; }
.card:hover .card-cta { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(0, 136, 204, .3); }
.card:hover .card-cta svg { transform: translateX(4px); }

.catalog-note {
  margin-top: 30px; text-align: center; color: var(--muted); font-size: 15.5px;
}
.catalog-note a { font-weight: 700; }

/* CTA-плашка внутри секций */
.mini-cta {
  margin-top: 36px;
  background: var(--tint);
  border: 1.5px solid var(--tint-2);
  border-radius: var(--r-md);
  padding: 22px 28px;
  display: flex; align-items: center; justify-content: center; gap: 12px 26px; flex-wrap: wrap;
  text-align: center;
}
.mini-cta p { font-size: 16.5px; font-weight: 600; color: var(--ink-2); }

/* Плавающая Telegram-панель (мобильные) */
.tg-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: none;
  align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1.5px solid var(--line);
  box-shadow: 0 -8px 28px rgba(10, 60, 90, .10);
  transform: translateY(110%);
  transition: transform .25s ease;
}
.tg-bar.show { transform: none; }
.tg-bar-price { flex: none; font-size: 12.5px; font-weight: 800; color: var(--ink-2); line-height: 1.25; }
.tg-bar .btn { flex: 1; justify-content: center; padding: 14px 16px; font-size: 16px; }

/* ---------- Шаги ---------- */
.steps-wrap { background: var(--white); border-block: 1.5px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; }
.steps::before {
  content: ''; position: absolute; top: 44px; left: 12%; right: 12%;
  border-top: 2.5px dashed var(--tint-2);
}
.step { position: relative; text-align: left; }
.step-num {
  width: 88px; height: 88px; border-radius: 50% 50% 50% 12px;
  background: var(--tint); color: var(--tg-deep);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 34px;
  margin-bottom: 22px; position: relative; z-index: 1;
  border: 6px solid var(--white);
  box-shadow: var(--shadow);
}
.step h3 { font-size: 20px; margin-bottom: 10px; font-weight: 800; }
.step p { color: var(--muted); font-size: 15.5px; }
.step p a { font-weight: 700; }

/* ---------- Районы ---------- */
.districts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.district {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 26px 24px 22px;
  color: var(--ink);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.district::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 5px;
  background: var(--grad); opacity: 0; transition: opacity .2s;
}
.district:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--tint-2); }
.district:hover::before { opacity: 1; }
.district h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; margin-bottom: 6px; }
.district p { font-size: 14.5px; color: var(--muted); min-height: 3em; }
.district span { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-weight: 800; font-size: 14.5px; color: var(--tg-deep); }
.district em.only-desk { font-style: normal; }

/* ---------- Почему Telegram (мини-чат) ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.why-list { display: grid; gap: 6px; margin-top: 8px; }
.why-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1.5px solid var(--line); }
.why-item:last-child { border-bottom: 0; }
.why-ico {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  background: var(--tint); color: var(--tg-deep);
  display: grid; place-items: center;
}
.why-item h3 { font-size: 17.5px; font-weight: 800; margin-bottom: 3px; }
.why-item p { font-size: 15px; color: var(--muted); }

.chat {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 460px;
  justify-self: center;
  width: 100%;
}
.chat-top {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--grad); color: #fff;
}
.chat-top .ava { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.chat-top b { font-size: 15.5px; display: block; line-height: 1.2; }
.chat-top small { font-size: 12.5px; opacity: .85; }
.chat-body { padding: 20px 16px 22px; display: grid; gap: 10px; background: linear-gradient(180deg, #F2F9FE, #EAF4FC); }
.msg {
  max-width: 82%;
  padding: 11px 15px;
  font-size: 14.5px; line-height: 1.45;
  box-shadow: 0 2px 6px rgba(10, 60, 90, .06);
}
.msg-in  { background: var(--white); border-radius: 18px 18px 18px 5px; justify-self: start; }
.msg-out { background: #D6EEFF; border-radius: 18px 18px 5px 18px; justify-self: end; }
.msg small { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 3px; }
.msg-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.msg-photos img { border-radius: 10px; height: 74px; width: 100%; object-fit: cover; }
.chat-cta { padding: 14px 16px; background: var(--white); border-top: 1.5px solid var(--line); }
.chat-cta .btn { width: 100%; justify-content: center; }

/* ---------- Цены (таблица) ---------- */
.price-table {
  width: 100%; border-collapse: collapse;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.price-table th, .price-table td { padding: 16px 20px; text-align: left; font-size: 15.5px; }
.price-table th {
  background: var(--ink); color: #fff;
  font-weight: 700; font-size: 14px; letter-spacing: .4px;
}
.price-table tr:nth-child(even) td { background: var(--paper); }
.price-table td b { font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--tg-deep); }
.price-table td small { color: var(--muted); }
.table-scroll { overflow-x: auto; border-radius: var(--r-md); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--tg); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 20px 58px 20px 24px;
  font-weight: 800; font-size: 17px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 20px; top: 50%; translate: 0 -50%;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--tint); color: var(--tg-deep);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 600;
  transition: rotate .2s, background .2s;
}
.faq details[open] summary::after { rotate: 45deg; background: var(--tg); color: #fff; }
.faq details p { padding: 0 24px 22px; color: var(--muted); font-size: 15.5px; }
.faq details p a { font-weight: 700; }

/* ---------- Финальный CTA ---------- */
.final-cta {
  background:
    radial-gradient(60% 90% at 15% 10%, rgba(42, 171, 238, .22), transparent 60%),
    radial-gradient(50% 80% at 90% 90%, rgba(0, 136, 204, .28), transparent 65%),
    var(--ink-deep);
  color: #fff;
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '✦'; position: absolute; font-size: 300px; line-height: 1;
  color: rgba(42, 171, 238, .07); right: -40px; top: -60px; transform: rotate(15deg);
}
.final-in { max-width: 780px; margin: 0 auto; text-align: center; position: relative; }
.final-over { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 2.4px; color: #7CCBF5; margin-bottom: 18px; }
.final-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.2; letter-spacing: -.3px;
  margin-bottom: 20px;
}
.final-sub { color: #A9C6DA; font-size: 17.5px; max-width: 60ch; margin: 0 auto 34px; }
.final-note { margin-top: 20px; font-size: 14px; color: #7896AC; }

/* ---------- Футер ---------- */
.site-foot { background: var(--ink-deep); color: #8FAEC4; padding: 58px 0 34px; border-top: 1px solid rgba(255,255,255,.06); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.brand-foot { color: #fff; margin-bottom: 16px; }
.brand-foot .brand-mark { background: var(--grad); }
.foot-about p { font-size: 14.5px; line-height: 1.6; margin-bottom: 14px; }
.foot-mail { color: #7CCBF5; font-weight: 700; font-size: 15px; }
.foot-h { color: #fff; font-weight: 800; font-size: 15px; margin-bottom: 14px; }
.foot-col a { display: block; color: #8FAEC4; font-size: 14.5px; padding: 5px 0; transition: color .15s; }
.foot-col a:hover { color: #7CCBF5; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .09); padding-top: 24px; font-size: 13.5px; display: grid; gap: 8px; }
.foot-disc { font-size: 12.5px; color: #5E7C93; max-width: 900px; }

/* ---------- Внутренние страницы ---------- */
.page-hero { padding: 56px 0 10px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--tg-deep); }
.crumbs .sep { color: var(--tint-2); }
.page-hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4vw, 48px); line-height: 1.16; letter-spacing: -.4px;
  max-width: 20ch;
}
.page-hero .lead { font-size: 18.5px; color: var(--muted); max-width: 62ch; margin-top: 16px; }
.page-hero .hero-btns { margin-top: 26px; margin-bottom: 0; }

.prose { max-width: 780px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 40px 0 14px; }
.prose h3 { font-size: 19px; margin: 26px 0 10px; }
.prose p { margin-bottom: 14px; color: var(--ink-2); }
.prose ul { margin: 0 0 16px 22px; color: var(--ink-2); }
.prose li { margin-bottom: 7px; }
.prose .tip {
  background: var(--tint); border-left: 4px solid var(--tg);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px; margin: 22px 0; font-size: 15.5px;
}

.two-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 34px 0; }
.two-photos img { border-radius: var(--r-md); height: 260px; width: 100%; object-fit: cover; box-shadow: var(--shadow); }
.two-photos .arch-l { border-radius: var(--arch); }

/* ---------- 404 ---------- */
.err { text-align: center; padding: 110px 0; }
.err .code { font-family: var(--serif); font-size: 120px; color: var(--tg); line-height: 1; }
.err h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 12px 0 10px; }
.err p { color: var(--muted); margin-bottom: 26px; }

/* ---------- Оживление интерфейса ---------- */

/* появление блоков при прокрутке (класс ставит JS) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* пульс главных Telegram-кнопок */
@keyframes tg-glow {
  0%, 100% { box-shadow: 0 8px 24px rgba(0, 136, 204, .35); }
  50% { box-shadow: 0 10px 34px rgba(0, 136, 204, .55), 0 0 0 7px rgba(42, 171, 238, .12); }
}
.hero-btns .btn-tg, .tg-bar .btn, .final-in .btn-tg { animation: tg-glow 2.6s ease-in-out infinite; }

/* пульс зелёной точки «онлайн» */
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(49, 181, 69, .45); }
  70% { box-shadow: 0 0 0 9px rgba(49, 181, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(49, 181, 69, 0); }
}
.hero-over .dot { animation: ping 2s ease-out infinite; }

/* сообщения чата: скрыты до «отправки», индикатор «печатает…» */
.msg { transition: opacity .35s ease, transform .35s ease; }
.msg-hidden { opacity: 0; transform: translateY(10px) scale(.98); }
.typing { display: inline-flex; align-items: center; gap: 5px; min-height: 20px; }
.typing i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #9DB4C6;
  animation: tdot 1s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot {
  0%, 100% { opacity: .35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1020px) {
  .hero-in { grid-template-columns: 1fr; gap: 48px; }
  .hero-photo img { height: 420px; }
  .sticker-price { left: 6px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .card-wide { grid-column: span 2; }
  .districts { grid-template-columns: 1fr 1fr; }
  .why { grid-template-columns: 1fr; gap: 46px; }
  .steps { gap: 26px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 74px 0 auto; z-index: 55;
    background: var(--white);
    flex-direction: column; gap: 0;
    padding: 12px 22px 20px;
    border-bottom: 1.5px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--paper); font-size: 17px; }
  .burger { display: flex; }
  .head-cta .btn-tg span { display: none; }
  .head-cta .btn-tg { padding: 11px 13px; }

  /* шаги: номер слева, текст справа — компактнее и читабельнее */
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .steps::before { display: none; }
  .step { display: grid; grid-template-columns: 62px 1fr; column-gap: 16px; }
  .step-num { grid-row: span 2; width: 62px; height: 62px; font-size: 24px; margin-bottom: 0; border-width: 4px; }
  .step h3 { margin-top: 6px; }

  /* плавающая Telegram-панель видна только на мобильных */
  .tg-bar { display: flex; }
  .site-foot { padding-bottom: 104px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 32px; }
  .hero { padding: 26px 0 20px; }
  .hero h1 { font-size: 33px; margin: 18px 0 14px; }
  .hero-sub { font-size: 16.5px; margin-bottom: 22px; }
  .hero-btns { margin-bottom: 26px; }
  .hero-photo img { height: 300px; }
  .hero-photo { border-width: 4px; }
  .ticker { margin-top: 30px; padding: 11px 0; }
  .bento { grid-template-columns: 1fr; gap: 16px; }
  .card-wide { grid-column: span 1; }
  .card-media img, .card-wide .card-media img { height: 210px; }
  .two-photos { grid-template-columns: 1fr; gap: 14px; }
  .two-photos img { height: 210px; }

  /* трастовые цифры — компактная сетка в один ряд */
  .hero-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .hero-trust div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .hero-trust b { font-size: 21px; }
  .hero-trust span { font-size: 12px; max-width: none; }

  /* районы — компактные плитки 2×2 */
  .districts { grid-template-columns: 1fr 1fr; gap: 12px; }
  .district { padding: 18px 16px 14px; }
  .district h3 { font-size: 19px; margin-bottom: 0; }
  .district p { display: none; }
  .district span { margin-top: 8px; font-size: 13px; }
  .only-desk { display: none; }

  .btn-xl { padding: 16px 26px; font-size: 16px; width: 100%; justify-content: center; }
  .mini-cta { padding: 20px; }
  .mini-cta .btn { width: 100%; justify-content: center; }
  .chat { max-width: none; }
  .page-hero { padding: 36px 0 6px; }
  .final-cta { padding: 62px 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .sticker, .ticker-track, .hero-btns .btn-tg, .tg-bar .btn, .final-in .btn-tg,
  .hero-over .dot, .typing i { animation: none; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
