/* Logopsis landing.
   Візуальний напрямок: specs/logopsis-landing/visual-direction.md
   Світла база плюс три темні кімнати (секції «робота у фоні», «голос», «фінал»).
   Перемикача тем на сторінці НЕМА свідомо: теми продукту показані кадрами, а не
   інтерактивом. Усі значення нижче взяті з токенів самого застосунку, щоб сторінка
   і продукт виглядали однією родиною. Нічого не тягнемо з мережі: сторінка мусить
   відкриватись локально файлом. */

:root {
  color-scheme: light;

  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #64748b;
  --line: #e2e8f0;
  --accent: #6d5efc;
  --accent-ring: rgba(109, 94, 252, 0.14);

  --frame-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.05);
  --cta-shadow: 0 4px 12px -6px rgba(109, 94, 252, 0.7);
  --cta-grad: linear-gradient(135deg, #6d5efc, #ff6b6b);
  --cta-grad-hover: linear-gradient(135deg, #5b4ce0, #fa5a48);

  --r: 12.8px;
  --r-frame: 16px;
  --r-frame-lg: 24px;
  --r-tile: 22px;
  --r-pill: 999px;
  --r-code: 6px;

  --maxw: 1200px;
  --text-col: 980px;
  --text-narrow: 760px;
  --pad: 24px;
  --gap: 24px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Темна кімната. Не тема сторінки, а секція іншого тону, всередині якої стоять
   темні кадри продукту, щоб кадр і фон збігались родиною, а не виглядали наліпкою. */
.room-dark {
  --bg: #0d1117;
  --bg-alt: #0d1117;
  --card: #1c232e;
  --ink: #e6edf3;
  --ink-2: #aeb9c5;
  --line: #2d3643;
  --accent: #8b7cf6;
  --frame-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.35);
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

section { padding: 96px 0; background: var(--bg); color: var(--ink); }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; max-width: 20ch; }

.lead {
  font-size: 20px;
  color: var(--ink-2);
  max-width: var(--text-narrow);
  margin-top: 16px;
}

.body-text { max-width: var(--text-narrow); margin-top: 24px; color: var(--ink); }
.body-text p + p { margin-top: 0; }
.body-text strong { font-weight: 650; }

/* ---------- Шапка ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__mark { width: 28px; height: 28px; display: block; }
.nav__spacer { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-pill);
  padding: 14px 28px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: var(--cta-grad);
  color: #fff;
  box-shadow: var(--cta-shadow);
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--cta-grad-hover); transform: translateY(-1px); }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--accent-ring), var(--cta-shadow); }
.btn--sm { padding: 9px 18px; font-size: 15px; }

.textlink {
  display: inline-block;
  margin-top: 16px;
  font-size: 16px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.textlink:hover { border-bottom-color: currentColor; }

/* ---------- Hero ---------- */

.hero { padding-top: 72px; }
.hero h1 { font-size: clamp(42px, 7vw, 72px); font-weight: 800; letter-spacing: -0.035em; max-width: 15ch; }
.hero__sub { font-size: 21px; color: var(--ink-2); max-width: 640px; margin-top: 20px; }
.hero__cta { margin-top: 32px; }
.hero__note { font-size: 15px; color: var(--ink-2); margin-top: 16px; }

/* ---------- Кадри продукту ---------- */

.shot {
  margin: 40px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r-frame);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--frame-shadow);
}
.shot--lg { border-radius: var(--r-frame-lg); }
.shot__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}
.shot__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.shot__title { margin-left: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.shot img { display: block; width: 100%; height: auto; }
/* Кадр, знятий цілою сторінкою, може бути в десять екранів заввишки. У секції такий
   файл нечитабельний, тому показуємо верхню частину сталої пропорції. Це кроп кадру,
   а не мокап: пікселі ті самі, просто видно перший екран. */
.shot--crop img { aspect-ratio: 16 / 10; height: auto; object-fit: cover; object-position: top center; }
.shot--crop-tall img { aspect-ratio: 4 / 3; }
.shot__cap { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }

.shot--missing .shot__ph {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 32px;
  text-align: center;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 13.5px;
  background: repeating-linear-gradient(45deg, transparent 0 10px, var(--bg-alt) 10px 20px);
}
figure { margin: 0; }

/* ---------- Дві колонки ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 32px; }
.split__tag { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.split__col--ours .split__tag { color: var(--accent); }
.split .shot { margin-top: 0; }

.prompt-box {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-code);
  background: var(--card);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: var(--text-col);
}
.prompt-box b { font-family: var(--font); color: var(--ink); }

/* ---------- Сітки ---------- */

.grid { display: grid; gap: 16px; margin-top: 32px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  padding: 22px;
  box-shadow: var(--soft-shadow);
}
.card h3 { font-size: 17px; font-weight: 650; margin-bottom: 8px; }
.card p { font-size: 15.5px; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; max-width: var(--text-col); }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-size: 14px;
  color: var(--ink-2);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .1);
}

/* ---------- Таблиці ---------- */

.table-wrap {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  max-width: var(--text-col);
}
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-alt); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
td.k { font-weight: 650; white-space: nowrap; }
td.v { color: var(--ink-2); }

/* ---------- Чесний блок ---------- */

.honest {
  margin-top: 28px;
  max-width: var(--text-col);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-code);
  background: var(--card);
  padding: 18px 20px;
  font-size: 16px;
  color: var(--ink);
}

/* ---------- FAQ ---------- */

.faq { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); max-width: var(--text-col); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 20px; font-weight: 650; font-size: 17px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-2); font-size: 22px; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { color: var(--accent); }
.faq__a { padding: 0 20px 20px; color: var(--ink-2); font-size: 16px; }

/* ---------- Фінал ---------- */

.final { text-align: center; }
.final h2, .final .lead { margin-left: auto; margin-right: auto; }
.final h2 { max-width: 22ch; }
.final .body-text { margin-left: auto; margin-right: auto; text-align: left; }
.form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.form input {
  flex: 1 1 320px;
  max-width: 380px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 14px 22px;
  font: inherit;
  font-size: 16px;
}
.form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.form__note { font-size: 15px; color: var(--ink-2); margin-top: 16px; }
.form__done { font-size: 16px; font-weight: 650; margin-top: 16px; color: var(--accent); }

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 56px;
  color: var(--ink-2);
  font-size: 15px;
}
.foot__in { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.foot__spacer { flex: 1; }
.foot__links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot__links a { color: var(--ink-2); text-decoration: none; font-size: 14px; transition: color .15s ease; }
.foot__links a:hover { color: var(--accent); }

/* ---------- Мобільна ---------- */

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --pad: 20px; }
  body { font-size: 16px; }
  section { padding: 64px 0; }
  .hero { padding-top: 48px; }
  .hero__sub, .lead { font-size: 18px; }
  .split { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .nav .btn { display: none; }
  .hero__cta .btn { width: 100%; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 520px; }
}

/* ---------- Сторінка завантаження (download.html) ---------- */

.dl { padding-top: 72px; }
.dl h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; letter-spacing: -0.035em; max-width: 18ch; }
.dl__outdated {
  margin-top: 24px; padding: 12px 16px; max-width: var(--text-narrow);
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--r); background: var(--card); font-weight: 600;
}
.dl__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 40px; }
.dl__card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-frame);
  padding: 28px; box-shadow: var(--soft-shadow);
}
.dl__card--rec { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring), var(--soft-shadow); }
.dl__card h2 { font-size: 28px; max-width: none; }
.dl__card h3 { font-size: 15px; margin-top: 8px; color: var(--ink-2); }
.dl__badge { display: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.dl__card--rec .dl__badge { display: block; }
.dl__btn { align-self: flex-start; }
.dl__btn--off { background: var(--bg-alt); color: var(--ink-2); box-shadow: none; cursor: not-allowed; border: 1px solid var(--line); }
.dl__btn--off:hover { background: var(--bg-alt); transform: none; }
.dl__soon { font-size: 15px; color: var(--ink-2); }
.dl__soon a { color: var(--accent); }
.dl__req { font-size: 15px; color: var(--ink-2); }
.dl__steps { margin: 0; padding-left: 22px; font-size: 16px; }
.dl__steps li { margin-bottom: 6px; }

/* двомовність: видно лише мову, що обрана на html[data-lang] */
[data-lang="uk"] [lang="en"], [data-lang="en"] [lang="uk"] { display: none; }
.lang { display: flex; gap: 4px; }
.lang__btn {
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: transparent; color: var(--ink-2);
}
.lang__btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

@media (max-width: 720px) {
  .dl { padding-top: 40px; }
  .dl__cards { grid-template-columns: 1fr; }
  .dl__card { padding: 22px; }
  .dl__btn { width: 100%; }
}
