/* Сайт Tacto: лендинг и документация. Тёмная шапка и лендинг в фирменных
   цветах, страницы документации — светлые и спокойные для чтения. */
:root {
  --ink: #0e1012;
  --ink-2: #171a1d;
  --cream: #f6f4ee;
  --lime: #c6ff3d;
  --lime-deep: #a4de19;
  --lime-ink: #2f4a00;
  --fg: #1d2125;
  --muted: #5e6875;
  --line: #e4e6ea;
  --soft: #f5f6f7;
  --link: #3d6b00;
  --radius: 14px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--fg); background: #fff;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: .1em .4em; }
pre { background: var(--ink-2); color: var(--cream); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
pre code { background: none; border: 0; padding: 0; color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Шапка */
.top { background: var(--ink); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(255,255,255,.06); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.top .logo img { height: 26px; width: auto; }
.top nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.top nav a { color: #c9ccd1; text-decoration: none; font-size: 15px; }
.top nav a:hover, .top nav a.on { color: #fff; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; transition: transform .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.lime { background: var(--lime); color: var(--ink); }
.btn.ghost { border-color: rgba(255,255,255,.22); color: #fff; }
.top .btn { padding: 8px 14px; font-size: 14px; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 22px; margin-left: auto; cursor: pointer; }

/* Лендинг */
.dark { background: var(--ink); color: #d7dadf; }
.hero {
  padding: 84px 0 72px; overflow: hidden;
  background: radial-gradient(70% 70% at 0% 0%, rgba(198,255,61,.16), transparent 60%),
              radial-gradient(60% 60% at 100% 30%, rgba(164,222,25,.10), transparent 60%), var(--ink);
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: 54px; line-height: 1.05; letter-spacing: -.03em; margin: 0 0 20px; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero p.lead { font-size: 19px; color: #b9bec5; margin: 0 0 30px; max-width: 520px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin-top: 18px; font-size: 14px; color: #8a919a; }
.hero img, .hero video { border-radius: var(--radius); }
.hero video { display: block; width: 100%; height: auto; }

.section { padding: 96px 0; }
.section.alt { background: var(--soft); }
.section h2 { font-size: 38px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; }
.section .sub { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 0 48px; }
.dark .section h2, .section.dark h2 { color: #fff; }
.dark .sub { color: #9aa0a8; }

.feature { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; margin-bottom: 96px; }
.feature:last-child { margin-bottom: 0; }
.feature.flip .text { order: 2; }
.feature .tag { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; color: var(--lime-ink); background: #eefbd2; border: 1px solid #d6f29a; border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.feature h3 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 14px; }
.feature p { color: var(--muted); font-size: 17px; margin: 0 0 14px; }
.feature ul { padding: 0; margin: 0; list-style: none; }
.feature li { padding-left: 26px; position: relative; margin-bottom: 8px; color: var(--muted); }
.feature li::before { content: ''; position: absolute; left: 4px; top: 10px; width: 9px; height: 9px; border-radius: 3px; background: var(--lime-deep); }
.feature li b { color: var(--fg); }
.shot { border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(14,16,18,.35); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius); padding: 26px; }
.step .n { width: 34px; height: 34px; border-radius: 10px; background: var(--lime); color: var(--ink); font-weight: 800; display: grid; place-items: center; margin-bottom: 16px; }
.step h4 { color: #fff; font-size: 19px; margin: 0 0 8px; }
.step p { margin: 0; color: #9aa0a8; font-size: 15px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid3.grid-2x2 { grid-template-columns: repeat(2, 1fr); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; }
.card .ic { font-size: 26px; margin-bottom: 10px; }
.card h4 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

details.faq { border-bottom: 1px solid var(--line); padding: 18px 0; }
details.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 24px; line-height: 1; }
details.faq[open] summary::after { content: '–'; }
details.faq p { color: var(--muted); margin: 12px 0 0; }

.cta { text-align: center; padding: 88px 0; background: radial-gradient(60% 90% at 50% 0%, rgba(198,255,61,.18), transparent 70%), var(--ink); }
.cta h2 { color: #fff; font-size: 40px; letter-spacing: -.02em; margin: 0 0 14px; }
.cta p { color: #9aa0a8; font-size: 18px; margin: 0 0 28px; }

.foot { background: var(--ink); color: #8a919a; font-size: 14px; padding: 36px 0; border-top: 1px solid rgba(255,255,255,.06); }
.foot .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.foot img { height: 20px; width: auto; }
.foot nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.foot a { color: #b9bec5; text-decoration: none; }
.foot a:hover { color: #fff; }
.foot .foot-bottom { justify-content: space-between; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.06); font-size: 13px; }

/* Документация */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 40px; padding-bottom: 96px; }
.side { position: sticky; top: 88px; align-self: start; }
.side h5 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.side a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--fg); text-decoration: none; font-size: 15px; margin-bottom: 2px; }
.side a:hover { background: var(--soft); }
.side a.on { background: #eefbd2; color: var(--lime-ink); font-weight: 700; }
.doc { max-width: 760px; }
.doc h1 { font-size: 40px; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 12px; }
.doc .lede { font-size: 19px; color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: 26px; letter-spacing: -.01em; margin: 48px 0 12px; scroll-margin-top: 88px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc h4 { font-size: 16px; margin: 22px 0 6px; }
.doc p, .doc li { color: #3a4048; }
.doc li { margin-bottom: 6px; }
.doc img.shot, .doc video.shot { margin: 24px 0 8px; }
video.shot { display: block; width: 100%; height: auto; background: #0e1012; }
.doc table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.callout { background: #f3fbe3; border: 1px solid #d6f29a; border-radius: 10px; padding: 14px 18px; margin: 20px 0; }
.callout p { margin: 0; }
.kbd { display: inline-block; font: 600 .85em ui-monospace, Menlo, monospace; padding: .05em .45em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: #fff; }
.next { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.next a { text-decoration: none; font-weight: 700; }
.next small { display: block; color: var(--muted); font-weight: 400; }

@media (max-width: 900px) {
  /* minmax(0, 1fr): a long line of code scrolls inside its block instead of widening the page. */
  .hero .wrap, .feature, .docs { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .feature.flip .text { order: 0; }
  .hero h1 { font-size: 40px; }
  .steps, .grid3, .grid3.grid-2x2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .feature { margin-bottom: 64px; }
  .side { position: static; }
  .top nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: flex-start; padding: 16px 24px 20px; gap: 14px; }
  .top nav.open { display: flex; }
  .menu-toggle { display: block; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 56px 0; }
  .hero h1 { font-size: 34px; }
  .section h2, .cta h2 { font-size: 30px; }
  .doc h1 { font-size: 32px; }
}

/* Квадратные GIF'ы в документации не растягиваем на всю колонку. */
.doc .shot.square { max-width: 520px; }

/* Language switcher in the footer: EN | RU. */
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; overflow: hidden; }
.foot .lang a { padding: 4px 9px; font-size: 13px; font-weight: 700; color: #8a919a; letter-spacing: .03em; }
.foot .lang a.on { background: rgba(255,255,255,.12); color: #fff; }
.foot .lang a:hover { color: #fff; }

/* Смена страницы: старое содержимое убирается мгновенно (site.js), новое
   слегка проявляется. Никаких снимков старой страницы поверх новой — они
   оставляли «хвосты» текста при переходе. */
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
.page-in .doc, .page-in .hero .wrap > div { animation: page-in .22s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .page-in .doc, .page-in .hero .wrap > div { animation: none; }
}

/* Long paths and addresses in running text wrap on a phone instead of widening the page. */
.doc p code, .doc li code, .doc td code { overflow-wrap: anywhere; }
