/* Головна сторінка платформи `/` (ТЗ КАН §6.4, PNL-SITE-01): серія коротких тез із повітрям —
   блоки на двох нейтральних тлах по черзі (межі видно без ліній), контент до 1120 px, текстова
   колонка до 640 px. Спершу — телефон 360–390 px: картки одна під одною, складники 2×2, кроки —
   вертикальною лінією; шапка не липка, кнопка бота — внизу екрана (`.dock`, `landing.js`). На
   комп'ютері шапка липка, до 56 px. Спільне (шрифт, кольори, кнопка) — `site.css`. Знімки
   екранів і телефон завжди світлі. Розгортання — нативні `<details>`: увесь рядок клікабельний,
   шеврон праворуч, відкриття — до 200 мс, без руху за `prefers-reduced-motion`. */

body { font-size: 18px; line-height: 1.5; }
.wrap { max-width: 1184px; margin: 0 auto; padding: 0 32px; }
.wrap.narrow { max-width: 704px; }
.block { padding: 96px 0; }
.alt { background: var(--bg-alt); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 32px; }
h3 { font-size: 19px; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
.lead { font-size: 20px; line-height: 1.5; color: var(--muted); }

/* Шапка */
.bar { position: sticky; top: 0; z-index: 10; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
.bar-in { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; text-decoration: none; }
.brand .mark { width: 34px; height: 34px; }
.bar .cta-short { min-height: 44px; }

/* Перший екран */
.hero { padding: 64px 0 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: 52px; line-height: 1.08; font-weight: 700; letter-spacing: -0.025em; }
.hero .lead { margin-top: 20px; max-width: 560px; }
.contact { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.offer { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 20px 32px; }
.offer li { display: flex; flex-direction: column; gap: 2px; }
.offer strong { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); white-space: nowrap; }
.offer span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.trust { margin-top: 32px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.trust a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

/* Знімок панелі в рамці браузера й телефон із ботом поверх нього */
.hero-visual { position: relative; padding: 0 0 56px; margin: 0; }
.browser,
.case-shot { margin: 0; border-radius: 12px; overflow: hidden; background: #FFFFFF; border: 1px solid #D8D2C7; box-shadow: 0 1px 2px rgba(20, 34, 42, 0.05), 0 18px 44px rgba(20, 34, 42, 0.12); }
.browser img,
.case-shot img { display: block; width: 100%; height: auto; }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #EEF0F1; border-bottom: 1px solid #DDE1E3; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #CBD2D6; }
.browser-bar span { margin-left: 10px; padding: 1px 12px; border-radius: 6px; background: #FFFFFF; font-size: 12px; line-height: 1.5; color: #55646C; }
.phone {
  position: absolute;
  right: -12px;
  bottom: 0;
  width: 264px;
  margin: 0;
  border: 8px solid #18222A;
  border-radius: 34px;
  overflow: hidden;
  background: #D9E4EA;
  box-shadow: 0 24px 50px rgba(20, 34, 42, 0.28);
  color: #14222A;
}
.tg-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; background: #FFFFFF; font-size: 14px; line-height: 1.25; }
.tg-head small { display: block; font-size: 12px; color: #6B7B84; }
.tg-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #2C6079; }
.tg-chat { display: flex; flex-direction: column; gap: 8px; padding: 14px 10px 18px; }
.msg { max-width: 90%; padding: 8px 10px 6px; border-radius: 12px 12px 12px 4px; background: #FFFFFF; font-size: 13px; line-height: 1.4; }
.msg.out { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: #E2F5D0; }
.msg time { display: block; margin-top: 2px; text-align: right; font-size: 11px; color: #6B7B84; }

/* Розгортання: болі, «Що всередині», часті питання */
.rows { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  padding: 14px 4px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.row summary::-webkit-details-marker { display: none; }
.row summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 6px 4px 0;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.row[open] > summary::after { transform: translateY(4px) rotate(-135deg); }
.row summary:hover { color: var(--accent-hover); }
.row summary:hover::after { border-color: currentColor; }
.answer { padding: 0 4px 22px; font-size: 17px; line-height: 1.55; color: var(--muted); animation: open 180ms ease-out; }
.answer p + p { margin-top: 10px; }
.answer a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.answer-links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .answer { animation: none; }
  .row summary::after { transition: none; }
}

/* Що ви отримаєте */
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.parts li { display: flex; flex-direction: column; gap: 10px; }
.parts svg { color: var(--ink); }
.parts p { font-size: 16px; color: var(--muted); }

/* Кейси: картки вирівняні по верху, сусідні не розтягуються */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: start; }
.case { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 22px; border-radius: 16px; background: var(--surface); }
.case-shot { margin: 0 -4px 6px; box-shadow: none; }
.case-kind { font-size: 15px; font-weight: 600; color: var(--muted); }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.facts li::before { content: "· "; }
.case .row { border-top: 1px solid var(--line); }
.case .row summary { font-size: 16px; }
.inside { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.more { align-self: flex-start; font-size: 16px; font-weight: 600; text-underline-offset: 3px; }
.more-projects { margin-top: 32px; font-size: 16px; color: var(--muted); }
.more-projects a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

/* Як працюємо: три кроки на одній лінії часу */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { position: relative; padding-top: 28px; border-top: 2px solid var(--line); }
.steps li::before { content: ""; position: absolute; left: 0; top: -7px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.steps strong { display: block; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); }
.steps h3 { margin: 10px 0 6px; }
.steps p { font-size: 17px; color: var(--muted); }

.team { font-size: 20px; line-height: 1.5; }

/* Заклик */
.final { text-align: center; }
.final .narrow { display: flex; flex-direction: column; align-items: center; }
.final h2 { margin-bottom: 16px; }
.final .contact { align-items: center; }

.foot { padding: 28px 0 32px; font-size: 14px; color: var(--muted); }
.foot a { color: var(--ink); text-underline-offset: 3px; }

/* Кнопка бота внизу екрана телефона: між першим екраном і закликом (`landing.js`) */
.dock { display: none; }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-visual { max-width: 680px; }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  .block { padding: 56px 0; }
  h2 { font-size: 24px; margin-bottom: 24px; }
  .lead { font-size: 18px; }
  .bar { position: static; }
  .brand .mark { width: 30px; height: 30px; }
  .hero { padding: 32px 0 56px; }
  .hero h1 { font-size: 32px; line-height: 1.12; }
  .hero .lead { margin-top: 16px; }
  .contact { align-items: stretch; margin-top: 24px; }
  .contact-note { text-align: center; }
  .offer { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px 24px; }
  .offer strong { font-size: 26px; }
  .browser { display: none; }
  .hero-visual { padding: 0; }
  .phone { position: static; margin: 0 auto; width: min(300px, 100%); }
  .row summary { font-size: 17px; }
  .parts { gap: 28px 20px; }
  .parts p { font-size: 15px; }
  .cases { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps li { padding: 0 0 28px 28px; border-top: 0; border-left: 2px solid var(--line); }
  .steps li:last-child { padding-bottom: 0; }
  .steps li::before { left: -7px; top: 4px; }
  .steps strong { font-size: 28px; }
  .team { font-size: 18px; }
  .final .contact { align-self: stretch; }
  .dock {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--bg);
    box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(20, 34, 42, 0.08);
    transform: translateY(110%);
    transition: transform 200ms ease;
  }
  .dock.on { transform: none; }
  .dock .cta { width: 100%; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .dock { transition: none; }
}
