/* ============================================================
   MTA.LAB — Paper & Ink design system
   Тёплая бумага · уголь · глубокий зелёный · латунь
   Никаких AI-клише: без градиентных мешков, без фиолетового,
   без «универсального» интерфейса.
   ============================================================ */

:root {
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --ink: #201d19;
  --ink-2: #55504a;
  --ink-3: #837d74;
  --line: #dcd5c8;
  --line-dark: #b9b0a0;
  --pine: #1f5146;
  --pine-deep: #123a31;
  --brass: #c8a24b;
  --wine: #7d2e33;
  --white: #fffdf8;
  --radius: 10px;
  --font: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand em { font-style: normal; color: var(--pine); }
.brand .mono { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--ink-3); }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.top nav a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.top nav a:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.top nav a.here { background: var(--pine); color: #fff; }
.tg-pill {
  margin-left: 10px;
  padding: 8px 14px;
  border: 1px solid var(--pine);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--pine);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tg-pill:hover { background: var(--pine); color: #fff; text-decoration: none; }

/* ---------- layout ---------- */
.wrap { max-width: 1380px; margin: 0 auto; padding: 0 32px; }
section { padding: 64px 0; }
kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brass);
  display: block;
  margin-bottom: 14px;
}
h1 { font-size: 56px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 20px; overflow-wrap: anywhere; }
h2 { font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 18px; font-weight: 700; }
h3 { font-size: 20px; margin: 0 0 8px; font-weight: 600; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 62ch; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 70px; }
.hero .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
.hero-art {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 44px rgba(32, 29, 25, .08);
}
.hero-art .bar { display: flex; gap: 6px; margin-bottom: 14px; }
.hero-art .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-dark); display: block; }
.hero-art .bar i:first-child { background: var(--wine); }
.mini-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--white);
}
.mini b { display: block; font-size: 22px; }
.mini span { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.mini.pine { background: var(--pine); color: #fff; border-color: var(--pine); }
.mini.pine span { color: rgba(255,255,255,.6); }
.mini.brass { background: #f3e8cf; border-color: #ddc98d; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(32,29,25,.16); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.green { background: var(--pine); border-color: var(--pine); }

/* ---------- product cards ---------- */
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid2 > *, .grid3 > *, .grid4 > *, .price-grid > *, .demo-zone > *, .hero .wrap > *, .order-row > * { min-width: 0; }
.pcard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .14s, box-shadow .14s;
  position: relative;
}
.pcard:hover { border-color: var(--line-dark); box-shadow: 0 14px 34px rgba(32,29,25,.08); }
.pcard .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--brass);
  text-transform: uppercase;
}
.pcard p { color: var(--ink-2); font-size: 15px; margin: 0; }
.pcard .to {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 600;
  color: var(--pine);
  font-size: 14.5px;
}
.pcard .to a { color: var(--pine); text-decoration: none; }
.pcard .to a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcard .to a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
.pcard .to .sep { color: var(--ink-3); padding: 0 4px; }

/* ---------- feature lists ---------- */
.feat { list-style: none; padding: 0; margin: 0; }
.feat li {
  padding: 10px 0 10px 30px;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--ink-2);
  font-size: 15.5px;
}
.feat li::before {
  content: "";
  position: absolute;
  left: 2px; top: 16px;
  width: 12px; height: 12px;
  border: 2px solid var(--pine);
  border-radius: 50%;
  background: transparent;
}
.feat li b { color: var(--ink); font-weight: 600; }

/* ---------- screenshot slots ---------- */
.slot {
  border: 2px dashed var(--line-dark);
  border-radius: 12px;
  background:
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(32,29,25,.025) 16px 17px),
    var(--paper-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 300px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: center;
  padding: 24px;
}
.slot .big {
  font-family: var(--font);
  font-size: 22px;
  color: var(--ink-2);
  font-weight: 600;
}

/* ---------- live screenshots ---------- */
.shot {
  position: relative;
  display: block;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: #fff;
  box-shadow: 0 18px 44px rgba(32,29,25,.12);
  transition: transform .16s, box-shadow .16s;
}
.shot:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(32,29,25,.18);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}
.shot .caption {
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  background: #fff;
  border-top: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot .live {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(31,81,70,.92);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.shot .live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #54d98c;
  border-radius: 50%;
  margin-right: 7px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}
.price.dark { background: var(--pine); color: #fff; border-color: var(--pine); }
.price .plan { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.price.dark .plan { color: #e8cf96; }
.price .amount { font-size: 42px; font-weight: 700; letter-spacing: -0.02em; margin: 10px 0 2px; }
.price .amount small { font-size: 15px; color: var(--ink-3); font-weight: 500; }
.price.dark .amount small { color: rgba(255,255,255,.6); }
.price ul { list-style: none; padding: 0; margin: 18px 0 22px; }
.price li { font-size: 14.5px; padding: 5px 0; color: var(--ink-2); }
.price.dark li { color: rgba(255,255,255,.85); }
.price li::before { content: "· "; font-weight: 700; color: var(--brass); }
.price .btn { width: 100%; justify-content: center; }

/* ---------- form ---------- */
.order {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px;
}
.order form { display: grid; gap: 14px; }
.order label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.order input, .order select {
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  width: 100%;
}
.order input:focus, .order select:focus { outline: 2px solid var(--pine); outline-offset: 0; border-color: var(--pine); }
.order .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- collab / footer ---------- */
.collab {
  border-top: 1px solid var(--line);
  padding: 48px 0;
}
.demo-grid {
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, transparent, rgba(31,81,70,.045));
  padding: 52px 0 64px;
}
.demo-zone {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
  align-items: start;
}
.demo-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.demo-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform .13s, border-color .13s, box-shadow .13s;
}
.demo-card:hover {
  transform: translateY(-2px);
  border-color: var(--pine);
  box-shadow: 0 10px 24px rgba(31,81,70,.12);
  text-decoration: none;
}
.demo-card b { font-size: 15px; color: var(--ink); font-weight: 600; }
.demo-card span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--pine);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.foot {
  border-top: 1px solid var(--line);
  padding: 44px 0 56px;
  color: var(--ink-3);
  font-size: 14px;
}
.foot .wrap { display: block; }
.foot-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 34px;
}
.foot-cols > div { display: flex; flex-direction: column; gap: 8px; }
.foot-cols b { font-size: 15px; color: var(--ink); font-weight: 600; }
.foot-cols a, .foot-cols p { color: var(--ink-3); font-size: 13.5px; margin: 0; }
.foot-cols a:hover { color: var(--pine); }
.foot-cols .mono { color: var(--brass); font-family: var(--mono); font-size: 12px; }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 20px; display: block; }
@media (max-width: 880px) {
  .demo-zone, .foot-cols { grid-template-columns: 1fr; }
  .demo-links { grid-template-columns: 1fr; }
}

/* quicknav внутри продукта */
.pn { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 0; }
.pn a {
  font-size: 13.5px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--ink-2);
}
.pn a:hover { background: var(--ink); color: #fff; text-decoration: none; }

/* ---------- side rails (wide screens) ---------- */
/* ---------- changelog ---------- */
.changelog { display: grid; gap: 18px; }
.cl-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px;
}
.cl-date { color: var(--brass); font-size: 13px; padding-top: 2px; }
.cl-item p { color: var(--ink-2); font-size: 15px; margin: 6px 0 0; }
@media (max-width: 880px) { .cl-item { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- mobile ---------- */
@media (max-width: 880px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero .wrap, .grid2, .grid4, .grid3, .price-grid { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: 1fr !important; }
  .top-in { flex-wrap: wrap; }
  section { padding: 44px 0; }
}

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 0 18px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--brass); font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }

/* ---------- Мобильная навигация: горизонтальный скролл вместо переносов ---------- */
@media (max-width: 760px) {
  .top nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .top nav a { flex: none; }
  .tg-pill { margin-left: 0; }
}

.article-cover { width: 100%; border-radius: 14px; border: 1px solid var(--line); margin: 22px 0 4px; display: block; }

section[id], [id="order-form"] { scroll-margin-top: 96px; }
html { scroll-padding-top: 96px; }

.order input[type="checkbox"], .order input[type="radio"] { width: auto; min-width: 0; margin: 2px 0 0; }
.order-success { background: #e8f5e8; border: 1px solid #b7dcb7; color: #1f5146; border-radius: 12px; padding: 18px 20px; font-weight: 600; margin-top: 14px; }

.table-scroll { overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
table.cmp th, table.cmp td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; }
table.cmp th { background: var(--pine); color: #fff; font-weight: 600; }
table.cmp td:first-child { color: var(--ink-3); font-family: var(--mono); font-size: 13px; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tc-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tc-card b { display: block; font-size: 14px; margin-bottom: 4px; }
.tc-ok { color: #1f5146; } .tc-bad { color: #7d2e33; } .tc-warn { color: #b8860b; }
.tc-card small { color: var(--ink-3); font-size: 12.5px; }

/* ---------- страница поддержки ---------- */
.support-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
@media (max-width: 880px) { .support-grid { grid-template-columns: 1fr; gap: 18px; } }
