/* Site Restorer — landing page styles
   Светлая тёплая нейтральная палитра, один приглушённый акцент,
   без внешних шрифтов и зависимостей. */

:root {
  --bg: #f7f5f1;
  --bg-2: #efebe4;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #16181a;
  --ink-2: #363b40;
  --muted: #656c73;
  --line: #e3dfd6;
  --line-strong: #d2cdc2;
  --accent: #2e5f55;
  --accent-hover: #254d45;
  --accent-ink: #1f453d;
  --accent-soft: #e7efeb;
  --accent-line: #cfdfd8;
  --warn-soft: #f4efe4;
  --warn-line: #e4d8c2;
  --warn-ink: #6b5636;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-xs: 0 1px 2px rgba(22, 24, 26, 0.04);
  --shadow-md: 0 12px 28px -18px rgba(22, 24, 26, 0.35), 0 1px 3px rgba(22, 24, 26, 0.05);
  --shadow-lg: 0 36px 70px -40px rgba(22, 24, 26, 0.45), 0 2px 10px rgba(22, 24, 26, 0.06);

  --maxw: 1120px;
  --gutter: 24px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131519;
    --bg-2: #191c21;
    --surface: #1b1e23;
    --surface-2: #16181c;
    --ink: #eceae5;
    --ink-2: #cfcdc7;
    --muted: #9aa1a8;
    --line: #2a2e34;
    --line-strong: #3a3f46;
    --accent: #86b8a9;
    --accent-hover: #9cc9ba;
    --accent-ink: #c6e2d8;
    --accent-soft: #1d2b27;
    --accent-line: #2f4a43;
    --warn-soft: #241f16;
    --warn-line: #3b3223;
    --warn-ink: #d3bd97;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 14px 30px -18px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.85), 0 2px 10px rgba(0, 0, 0, 0.45);
  }

  .shot img { opacity: 0.94; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 640;
  letter-spacing: -0.022em;
  line-height: 1.18;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--accent-ink); text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

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

::selection { background: var(--accent-soft); color: var(--accent-ink); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 640;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .brand-mark { color: #10201c; }
}
.brand-mark svg { width: 17px; height: 17px; }
.brand:hover .brand-mark { background: var(--accent-hover); }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 12px;
}

.nav a {
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.lang a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent-line);
}
.lang .sep { color: var(--line-strong); }

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:active { transform: translateY(1px); }

@media (prefers-color-scheme: dark) {
  .btn-primary { color: #0f1f1b; }
  .btn-primary:hover { color: #0f1f1b; }
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted); }

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
  padding-inline: 4px;
}
.btn-quiet:hover { color: var(--ink); }

.btn-small { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Section primitives ---------- */

.section { padding-block: 84px; border-top: 1px solid var(--line); }
.section-tight { padding-block: 56px; }
.section-head { max-width: 720px; margin-bottom: 40px; }

.eyebrow {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--accent); } }

.section-head h2 { font-size: clamp(1.55rem, 2.5vw, 2.05rem); }
.section-head .lead { margin-top: 14px; }

.lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--muted);
}

.prose p + p { margin-top: 0.9em; }
.prose { color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.6; }

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

.hero { padding-block: 72px 76px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.15rem, 4.2vw, 3.35rem);
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero .lead {
  font-size: 1.125rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 14px; height: 14px; color: var(--accent); flex: none; }

.hero-media { position: relative; }

.shot {
  margin: 0;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.shot img { display: block; width: 100%; }
.shot-caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

/* ---------- Stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-block: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat b {
  display: block;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.stat span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }

/* ---------- Cards ---------- */

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-xs);
}
.card h3 {
  font-size: 1.02rem;
  font-weight: 640;
  letter-spacing: -0.012em;
  margin: 14px 0 8px;
}
.card p { font-size: 14.8px; line-height: 1.6; color: var(--muted); }

.icon-box {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid var(--accent-line);
}
.icon-box svg { width: 18px; height: 18px; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  counter-increment: step;
  padding-top: 20px;
  border-top: 2px solid var(--line);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.steps h3 { font-size: 1rem; margin-bottom: 6px; }
.steps p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }

.output {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  align-items: start;
}

.code-panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.code-lang {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.code-body {
  margin: 0;
  padding: 14px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.code-body code {
  font-family: inherit;
  white-space: pre;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--ink); border-color: var(--muted); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn[data-copied="true"] { color: var(--accent); border-color: var(--accent-line); }

.folder-tree {
  margin: 0;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 7px;
  overflow-x: auto;
}
.ft-row {
  display: grid;
  grid-template-columns: minmax(92px, max-content) 1fr;
  gap: 16px;
  align-items: baseline;
}
.ft-row code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}
.ft-row span {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.folder-tree .dim { color: var(--muted); }

/* ---------- Case ---------- */

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.case-figures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.case-figures div {
  background: var(--surface);
  padding: 20px 18px;
}
.case-figures b {
  display: block;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.case-figures span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }

.case-list { margin: 18px 0 0; padding: 0; list-style: none; }
.case-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink-2);
}
.case-list li:last-child { border-bottom: 0; }
.case-list svg { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); }

/* ---------- Callout ---------- */

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  font-size: 14.8px;
  line-height: 1.6;
  color: var(--ink-2);
}
.callout strong { color: var(--ink); }

.callout-warn {
  border-left-color: var(--warn-line);
  background: var(--warn-soft);
  color: var(--warn-ink);
}
.callout-warn strong { color: var(--warn-ink); }

/* ---------- Download ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-xs);
}
.dl-card h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.dl-card h3 .chip {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.dl-card .dl-meta {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 16px;
}
.dl-card ul {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  color: var(--ink-2);
}
.dl-card ul li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  padding: 6px 0;
}
.dl-card ul svg { width: 15px; height: 15px; color: var(--accent); margin-top: 3px; }
.dl-card .btn { margin-top: auto; }

.req-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}
.req {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.req b { display: block; font-size: 14px; margin-bottom: 3px; }
.req span { font-size: 13.5px; color: var(--muted); }

/* ---------- Support ---------- */

.support {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 32px 34px;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.support h2 { font-size: 1.35rem; margin-bottom: 8px; }
.support p { font-size: 15px; color: var(--ink-2); max-width: 56ch; }
.support .btn { white-space: nowrap; }

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

.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 6px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 9px; }
.faq .answer {
  padding: 0 0 20px;
  max-width: 78ch;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 44px 36px;
  font-size: 14px;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--ink); font-weight: 620; }
.footer-brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
.footer-brand .brand-mark svg { width: 15px; height: 15px; }
.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 12px;
}
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-block: 56px 60px; }
  .hero .lead { max-width: 62ch; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: 1fr; gap: 28px; }
  .output { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 0; font-size: 15px; width: 100%; }
  .menu-btn { display: inline-flex; }
  .header-actions { gap: 10px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .section { padding-block: 60px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 18px 16px; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); padding-top: 16px; }
  .grid-3, .grid-2, .dl-grid { grid-template-columns: 1fr; }
  .support { grid-template-columns: 1fr; gap: 20px; padding: 26px 22px; }
  .support .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .brand span.brand-name { display: inline; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-note { flex-direction: column; align-items: flex-start; gap: 5px; }
  .code-body { font-size: 12.5px; padding: 12px 14px; }
}

@media (max-width: 420px) {
  .header-actions .btn span { display: none; }
  .header-actions .btn { padding-inline: 12px; }
}

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

@media print {
  .site-header, .hero-media, .support, .site-footer .footer-col:last-child { display: none; }
  body { background: #fff; color: #000; }
  .section { border-top: 0; padding-block: 20px; }
}
