/* ============================================================
   SEOdyssey · landing design system
   Тёплая бумага · чернила · перивинкль · Inter + JetBrains Mono
   Подключается всеми страницами landing/ через base.html
   ============================================================ */

:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --surface-2: #FAF8F4;
  --line: rgba(21, 20, 15, 0.09);
  --line-strong: rgba(21, 20, 15, 0.18);
  --ink: #15140F;
  --ink-2: #3D3A33;
  --body: #5C584F;
  --muted: #6E695E;
  --faint: #8A857A;
  --accent: #6378FF;
  --accent-hover: #4F5BE0;
  --accent-bg: #EEF0FF;
  --accent-line: rgba(99, 120, 255, 0.22);
  --accent-ink: #3D4CC4;
  --ok: #1F7A3D; --ok-dot: #28C840; --ok-soft: #9FE6B8;
  --warn: #8A5A00; --warn-dot: #FEBC2E; --warn-soft: #E2B589;
  --fail: #B3261E; --fail-dot: #FF6058; --fail-bg: #FFF4F2; --fail-line: rgba(255, 96, 88, 0.22);
  --dark: #15140F;
  --dark-2: #1C1D21;
  --dark-line: rgba(255, 255, 255, 0.08);
  --dark-body: #B6B1A6;
  --dark-faint: #8E8A80;
  --code-bg: #121316;
  --radius-s: 10px;
  --radius-m: 13px;
  --radius-l: 18px;
  --radius-xl: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------- типографика ---------- */
.display {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
h1.display { font-size: clamp(36px, 4.8vw, 58px); line-height: 1.06; margin: 0; }
h2.display { font-size: clamp(29px, 3.6vw, 46px); line-height: 1.08; margin: 0; }
.display .acc { color: var(--accent); }
.lead { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: var(--body); }
.section-dark .lead { color: var(--dark-body); }

/* ---------- каркас ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-narrow { max-width: 1100px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: clamp(72px, 8vw, 116px); padding-bottom: clamp(72px, 8vw, 116px); }
.section-dark { background: var(--dark); color: #F2EFE8; }
.section-white { background: var(--surface); border-top: 1px solid var(--line); }

/* ---------- навигация ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(247, 244, 238, 0.78);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 13px 24px; display: flex; align-items: center; gap: 20px; }
.nav-logo { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.nav-logo img { display: block; }
.nav-logo-name { display: flex; flex-direction: column; line-height: 1.05; }
.nav-logo-name b { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.nav-logo-name small { font-size: 11px; color: var(--faint); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14.5px; color: #4A463E; font-weight: 500; }
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); font-weight: 600; }
.nav-cta {
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: 11px;
  font-weight: 600; font-size: 14.5px;
  transition: transform .15s, background .15s;
}
.nav-cta:hover { transform: translateY(-1px); background: #2B2A22; }
.nav-burger {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--line-strong);
  border-radius: 11px; background: transparent; cursor: pointer; color: var(--ink);
}
.nav-mobile {
  display: none; flex-direction: column; gap: 4px;
  padding: 10px 16px 18px; border-top: 1px solid var(--line);
  background: rgba(247, 244, 238, 0.97);
}
.nav-mobile a { padding: 11px 8px; font-size: 16px; font-weight: 500; color: var(--ink-2); border-radius: 9px; }
.nav-mobile a:active { background: var(--accent-bg); }
.nav-mobile .nav-cta { text-align: center; margin-top: 8px; color: var(--bg); }
@media (max-width: 920px) {
  .nav-links, .nav-inner > .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
}
@media (min-width: 921px) { .nav-mobile { display: none !important; } }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: var(--radius-m); border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 16px;
  transition: transform .15s, background .15s, box-shadow .15s, border-color .15s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 26px -10px rgba(99, 120, 255, 0.7); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(21, 20, 15, 0.04); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: #2B2A22; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- карточки и панели ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px; }
.card-tinted { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px; }
.card-dark { background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius-l); padding: 28px; }
.card-hover { transition: transform .18s, box-shadow .18s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(21, 20, 15, 0.32); }

/* пилюля-бейдж */
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--accent-bg); border: 1px solid var(--accent-line);
  font-size: 13px; font-weight: 600; color: var(--accent-ink);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* иконка-плитка */
.tile-ic {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 12px; margin-bottom: 18px;
}
.tile-ic-accent { background: var(--accent); color: #fff; }
.tile-ic-ink { background: var(--ink); color: #fff; }
.tile-ic-soft { background: #F1F0EC; color: var(--ink); }

/* ---------- код-блок ---------- */
.codeblock { background: var(--code-bg); border-radius: 16px; overflow: hidden; }
.codeblock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid var(--dark-line);
}
.codeblock-head .filename { font-size: 12.5px; color: #7E8AB0; font-family: 'JetBrains Mono', monospace; }
.codeblock pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.codeblock code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.7; color: #D6DBE8; white-space: pre; }
.copy-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: none;
  padding: 6px 13px; border-radius: 8px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; font-family: 'Inter', sans-serif;
  transition: background .15s;
}
.copy-btn:hover { background: var(--accent-hover); }
.copy-btn.muted { background: #262833; color: #C9D2F0; }
.copy-btn.muted:hover { background: #33364a; }

/* ---------- футер ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 54px 24px 40px; display: flex; flex-wrap: wrap; gap: 34px; justify-content: space-between; }
.footer-brand p { font-size: 14px; color: var(--faint); line-height: 1.55; margin: 0; max-width: 300px; }
.footer-cols { display: flex; gap: 54px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #9A958B; }
.footer-col a { font-size: 14.5px; color: #4A463E; transition: color .15s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom-inner { max-width: 1200px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; color: #9A958B; }

/* ---------- формы ---------- */
.field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.field-input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-m); padding: 15px 16px;
  font-size: 16px; font-family: 'Inter', sans-serif; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field-input::placeholder { color: #77726A; }
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(99, 120, 255, 0.16); background: var(--surface); }
.field-hint { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 10px 2px 0; }
.field-error {
  margin-bottom: 18px; padding: 12px 14px;
  border: 1px solid var(--fail-line); border-radius: var(--radius-s);
  background: var(--fail-bg); font-size: 13.5px; color: var(--fail); line-height: 1.5;
}

/* ---------- анимации ---------- */
@keyframes scfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
[data-reveal], [data-reveal-group] > * { will-change: opacity, transform; }

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