/* TruePost — публичная страница. Разговор: лендинг начинается с вопроса,
   который агентству задаёт клиент. Палитра логотипа, но подача мягче
   кабинета: крупные скругления, воздух, интерфейс переписки.
   Страница всегда светлая — тёмная тема здесь не нужна, цвета заданы явно. */

:root {
  --air: #e7edf8;
  --card: #ffffff;
  --ink: #16203a;
  --ink-2: #59657f;
  --ink-3: #8b97ae;
  --rule: #d3dcec;
  --blue: #2563eb;
  --blue-dark: #1b4fd0;
  --blue-soft: #eaf0ff;
  --green: #15795d;
  --red: #c0394a;

  --sans: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pad: clamp(1.15rem, 3.5vw, 3rem);
  --shadow-soft: 0 1px 2px rgb(22 32 58 / 0.06), 0 14px 30px -22px rgb(22 32 58 / 0.5);
  --shadow-card: 0 1px 2px rgb(22 32 58 / 0.06), 0 20px 44px -26px rgb(22 32 58 / 0.6);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--air) radial-gradient(1200px 520px at 78% -8%, #f3f7ff, var(--air) 62%) no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

:is(h1, h2, h3) { text-wrap: balance; }
p { text-wrap: pretty; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--pad); }

/* ── Шапка ───────────────────────────────────────────────── */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: clamp(0.9rem, 2vw, 1.35rem) 0;
}

.logo {
  display: block;
  width: clamp(104px, 12vw, 124px);
  height: auto;
}

.bar__right { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.25rem); }

.lang {
  display: flex;
  gap: 0.2rem;
  padding: 2px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.7);
}

.lang button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 4px 9px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.bar__enter {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}

.bar__enter:hover { text-decoration: underline; }

/* ── Первый экран ────────────────────────────────────────── */

.hero {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2rem);
  padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 3.5rem; align-items: center; }
}

.hero h1 {
  font-size: clamp(1.95rem, 6.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 15ch;
}

.hero h1 em { font-style: normal; color: var(--blue); }

.hero__lead {
  margin-top: clamp(0.9rem, 2.5vw, 1.2rem);
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 48ch;
}

.hero__lead b { color: var(--ink); font-weight: 500; }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: clamp(1.25rem, 3vw, 1.7rem); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.btn--solid { background: var(--blue); color: #fff; border: 1px solid var(--blue); }
.btn--solid:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn--ghost { color: var(--ink); border: 1px solid var(--rule); background: rgb(255 255 255 / 0.6); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }

.btn svg { width: 16px; height: 16px; flex: none; }

/* ── Переписка ───────────────────────────────────────────── */

.thread { display: flex; flex-direction: column; gap: 0.7rem; }

.thread__day {
  align-self: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.75);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.msg {
  max-width: 86%;
  padding: 0.85rem 1.05rem;
  font-size: 14.5px;
  line-height: 1.55;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.msg--in { align-self: flex-start; background: var(--card); border-bottom-left-radius: 5px; }
.msg--out { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }

.msg__who {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.msg--out .msg__who { color: rgb(255 255 255 / 0.72); }

/* Пауза между вопросом клиента и ответом — та самая, неловкая */
.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.95rem 1.05rem;
  background: var(--card);
  border-radius: 18px;
  border-bottom-left-radius: 5px;
  box-shadow: var(--shadow-soft);
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: blip 1.25s ease-in-out infinite;
}

.typing i:nth-child(2) { animation-delay: 0.16s; }
.typing i:nth-child(3) { animation-delay: 0.32s; }

@keyframes blip {
  0%, 100% { opacity: 0.28; transform: translateY(0); }
  45% { opacity: 1; transform: translateY(-3px); }
}

/* Ответ продукта — не пузырь, а карточка отчёта */

.report {
  align-self: flex-end;
  width: min(100%, 400px);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  border-bottom-right-radius: 5px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.report__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--blue-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--blue);
}

.report__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
}

.report__row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report__row b { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }

.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag--ok { color: var(--green); }
.tag--no { color: var(--red); }
.tag--hand { color: var(--ink-3); }

.report__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem 0.85rem;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--ink-2);
}

.report__foot span:last-child { color: var(--blue); font-weight: 500; white-space: nowrap; }

/* ── Разделы ─────────────────────────────────────────────── */

.section { padding-top: clamp(2rem, 5vw, 3.5rem); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.section h2 {
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.section__note { font-size: 13.5px; color: var(--ink-3); }

.cards { display: grid; gap: 0.9rem; margin-top: clamp(1.1rem, 2.5vw, 1.5rem); }

@media (min-width: 620px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.cards li {
  padding: 1.15rem 1.25rem 1.3rem;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid rgb(255 255 255 / 0.9);
  border-radius: 16px;
}

.cards i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--blue);
}

.cards h3 { margin-top: 0.5rem; font-size: 1rem; font-weight: 600; }
.cards p { margin-top: 0.45rem; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }

.honest {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(1.25rem, 3vw, 2.25rem);
  padding: clamp(1.3rem, 3vw, 2rem);
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

@media (min-width: 860px) { .honest { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2.5rem; } }

.honest h3 { font-size: clamp(1.1rem, 2.4vw, 1.2rem); font-weight: 600; letter-spacing: -0.02em; }
.honest p { margin-top: 0.6rem; font-size: 14.5px; line-height: 1.66; color: var(--ink-2); }
.honest ul { display: grid; gap: 0.75rem; align-content: start; }

.honest li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

.honest li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--blue);
}

.honest li.is-manual::before { background: var(--ink-3); }
.honest li b { color: var(--ink); font-weight: 500; }

/* ── Финальный блок ──────────────────────────────────────── */

.close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: clamp(1.75rem, 4vw, 3rem);
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
}

.close h2 { font-size: clamp(1.25rem, 3.2vw, 1.85rem); font-weight: 600; letter-spacing: -0.025em; max-width: 20ch; }
.close p { margin-top: 0.55rem; font-size: 14.5px; line-height: 1.6; color: #b9c4d8; max-width: 40ch; }
.close .btn--solid { background: #fff; color: var(--ink); border-color: #fff; }
.close .btn--solid:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ── Мобильная полоса с заявкой ──────────────────────────── */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: none;
  padding: 0.6rem var(--pad) calc(0.6rem + env(safe-area-inset-bottom));
  background: rgb(231 237 248 / 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--rule);
  transform: translateY(110%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.dock .btn { width: 100%; }
.dock.is-up { transform: none; }

@media (max-width: 720px) {
  .dock { display: block; }
  body { padding-bottom: 4.5rem; }
}

/* ── Мелкие экраны ───────────────────────────────────────── */

@media (max-width: 720px) {
  .hero { padding-top: clamp(1rem, 4vw, 2rem); }
  .msg { max-width: 92%; font-size: 14px; }
  .report { width: 100%; }
  .thread { gap: 0.55rem; }
}

@media (max-width: 460px) {
  .bar__enter { font-size: 13px; }
  .actions .btn { width: 100%; }
  .report__row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.6rem; font-size: 13px; padding: 0.6rem 0.85rem; }
  .report__top, .report__foot { padding-left: 0.85rem; padding-right: 0.85rem; }
  .close { padding: 1.35rem 1.15rem 1.5rem; }
  .close .btn { width: 100%; }
  .foot { font-size: 9.5px; letter-spacing: 0.12em; }
}

@media (prefers-reduced-motion: reduce) {
  .typing i { animation: none; }
  .dock { transition: none; }
  .btn:active { transform: none; }
}
