/* Random Coffee — лендинг продукта.
   Дизайн-система перенесена с barchenkov.tech: швейцарская вёрстка,
   один акцент, только линии 1px. Ноль скруглений, теней и градиентов.
   Отличается от личного сайта единственным знанием — акцентным цветом. */

:root {
  /* Светлая палитра (по умолчанию) */
  --bg: #f2f3f1;
  --bg-raise: #fafaf8;
  --bg-dim: #e8eae6;
  --ink: #14171f;
  --ink-soft: #3a4048;
  --muted: #5f6772;
  --line: #d7d9d3;
  --line-strong: #14171f;
  --accent: #0f7d6b;
  --accent-hover: #0a5f51;
  --accent-contrast: #ffffff;
  --data-blue: #2b4bd7;

  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-body: 'Golos Text', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141a;
    --bg-raise: #1a1d25;
    --bg-dim: #171a21;
    --ink: #ecede9;
    --ink-soft: #c9ccc6;
    --muted: #8f96a0;
    --line: #2b2f3a;
    --line-strong: #ecede9;
    --accent: #2fbfa5;
    --accent-hover: #4fd6bd;
    --accent-contrast: #16181e;
    --data-blue: #8ca0ff;
  }
}

:root[data-theme="dark"] {
  --bg: #12141a;
  --bg-raise: #1a1d25;
  --bg-dim: #171a21;
  --ink: #ecede9;
  --ink-soft: #c9ccc6;
  --muted: #8f96a0;
  --line: #2b2f3a;
  --line-strong: #ecede9;
  --accent: #2fbfa5;
  --accent-hover: #4fd6bd;
  --accent-contrast: #16181e;
  --data-blue: #8ca0ff;
}

/* ── База ─────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

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

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; display: block; }

a {
  color: var(--data-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.section {
  padding-block: clamp(56px, 8vw, 112px);
  border-bottom: 1px solid var(--line);
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow b { color: var(--accent); font-weight: 500; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(20px, 3vw, 48px);
  margin-bottom: clamp(32px, 5vw, 64px);
}
.section-head .eyebrow { padding-top: 6px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.2;
  max-width: 18em;
}

.section-intro { margin-top: 16px; color: var(--muted); max-width: 36em; }

.accent-dot { color: var(--accent); }

/* ── Кнопки ───────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 26px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.site-nav { display: flex; gap: 22px; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }

.header-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-contrast);
  background: var(--accent);
  padding: 9px 18px;
  transition: background-color 0.15s ease;
}
.header-cta:hover { background: var(--accent-hover); color: var(--accent-contrast); }

/* ── Герой ────────────────────────────────────────────── */

.hero { border-bottom: 1px solid var(--line); overflow: clip; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(48px, 7vw, 104px) clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero-name { font-size: clamp(30px, 5vw, 56px); margin-top: 14px; }

.hero-thesis {
  margin-top: clamp(20px, 3vw, 30px);
  font-size: clamp(17px, 1.9vw, 20px);
  color: var(--ink-soft);
  max-width: 30em;
}
.hero-thesis strong { color: var(--ink); font-weight: 600; }

.hero-roles {
  margin: clamp(22px, 3vw, 32px) 0 0;
  padding: 0 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 2px solid var(--accent);
}
.hero-roles li {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.hero-roles li b { color: var(--ink); font-weight: 500; }

.hero-cta {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Диалог бота вместо фотографии — «планшет» той же геометрии */
.hero-demo { position: relative; justify-self: end; width: min(100%, 420px); }
.hero-demo::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  background: var(--accent);
  z-index: 0;
}
.hero-demo figure {
  position: relative;
  z-index: 1;
  margin: 0;
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
}
.chat { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg {
  font-size: 14.5px;
  line-height: 1.5;
  padding: 10px 13px;
  max-width: 88%;
  background: var(--bg-dim);
  color: var(--ink-soft);
}
.msg-bot { align-self: flex-start; }
.msg-user { align-self: flex-end; background: var(--accent); color: var(--accent-contrast); }
.msg b { color: var(--ink); font-weight: 600; }
.msg-user b { color: var(--accent-contrast); }
.hero-demo figcaption {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Полоса фактов ────────────────────────────────────── */

.facts { background: var(--bg-dim); border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: clamp(24px, 3vw, 38px) clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.fact:first-child { border-left: none; padding-left: 0; }
.fact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 34px);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.fact-label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  max-width: 16em;
}

/* ── Сетка возможностей ───────────────────────────────── */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.offer {
  background: var(--bg);
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background-color 0.2s ease;
}
.offer:hover { background: var(--bg-raise); }
.offer-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.offer h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.3;
}
.offer p { color: var(--muted); font-size: 15.5px; }
.offer-for {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ── Как это работает ─────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.step { border-top: 3px solid var(--accent); padding-top: 18px; }
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.step h3 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
}
.step p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

/* ── Финальный призыв ─────────────────────────────────── */

.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.15;
  margin-top: 14px;
}
.cta-note { margin-top: 18px; color: var(--muted); max-width: 30em; }
.cta-list { margin: 0; padding: 0; list-style: none; }
.cta-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.cta-list li:last-child { border-bottom: 1px solid var(--line); }
.cta-list dt, .cta-list .k { color: var(--muted); text-transform: uppercase; font-size: 11.5px; }
.cta-list .v { color: var(--ink); text-align: right; }

/* ── Подвал ───────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--line-strong); }
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ── Появление при скролле ────────────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Адаптив ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-demo { justify-self: start; width: min(100%, 380px); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: none; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-nav { display: none; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .offer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .facts-grid { grid-template-columns: 1fr; }
  .fact { border-left: none; padding-left: 0; border-top: 1px solid var(--line); }
  .fact:first-child { border-top: none; }
}
