/* #дзен_digital — базовые стили. Один файл на все страницы. */

:root {
  --paper:      #faf8f4;
  --paper-2:    #f2eee6;
  --sand:       #e6dfd2;
  --ink:        #1b1d1a;
  --ink-soft:   #4a4d47;
  --ink-mute:   #74776f;
  --pine:       #2f4f3f;
  --pine-soft:  #3d6450;
  --clay:       #b2653a;
  --clay-dark:  #9a5630;
  --line:       rgba(27, 29, 26, 0.12);
  --card:       #ffffff;
  --shadow:     0 1px 2px rgba(27,29,26,.04), 0 8px 24px rgba(27,29,26,.05);
  --radius:     14px;
  --maxw:       1080px;
  --gutter:     16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #14160f;
    --paper-2:   #1b1e16;
    --sand:      #262a20;
    --ink:       #ece8dd;
    --ink-soft:  #c3bfb3;
    --ink-mute:  #8e8c80;
    --pine:      #8fc0a4;
    --pine-soft: #a7cfb8;
    --clay:      #e09163;
    --clay-dark: #c97c4f;
    --line:      rgba(236, 232, 221, 0.14);
    --card:      #1c1f18;
    --shadow:    0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  --paper:     #14160f;
  --paper-2:   #1b1e16;
  --sand:      #262a20;
  --ink:       #ece8dd;
  --ink-soft:  #c3bfb3;
  --ink-mute:  #8e8c80;
  --pine:      #8fc0a4;
  --pine-soft: #a7cfb8;
  --clay:      #e09163;
  --clay-dark: #c97c4f;
  --line:      rgba(236, 232, 221, 0.14);
  --card:      #1c1f18;
  --shadow:    0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, .serif {
  font-family: Georgia, "Times New Roman", "PT Serif", serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(32px, 5.2vw, 56px); line-height: 1.12; margin: 0 0 20px; }
h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2;  margin: 0 0 14px; }
h3 { font-size: 20px; line-height: 1.3; margin: 0 0 10px; }

p { margin: 0 0 16px; }
a { color: var(--pine); text-decoration: none; border-bottom: 1px solid rgba(47,79,63,.3); }
a:hover { color: var(--clay); border-bottom-color: rgba(178,101,58,.5); }

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

section { padding: 72px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
@media (max-width: 640px) { section { padding: 52px 0; } }

.eyebrow {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 14px; font-weight: 600;
}
.lead  { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-mute); }
.small { font-size: 15px; }

/* --- шапка --- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand {
  font-family: Georgia, serif; font-size: 19px; color: var(--ink);
  border: 0; white-space: nowrap;
}
.brand span { color: var(--pine); }
.topnav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.topnav a { font-size: 15px; color: var(--ink-soft); border: 0; }
.topnav a:hover { color: var(--clay); }
@media (max-width: 820px) { .topnav .hide-sm { display: none; } }

/* --- кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: 999px; border: 0;
  font-size: 16px; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-align: center;
}
.btn-primary { background: var(--clay); color: #fff; }
.btn-primary:hover { background: var(--clay-dark); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover { color: var(--clay); box-shadow: inset 0 0 0 1.5px var(--clay); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
a.btn { border-bottom: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* --- герой --- */
.hero { padding: clamp(56px, 9vw, 104px) 0 64px; }
.hero .lead { margin-top: 4px; }
.hero-note { font-size: 15px; color: var(--ink-mute); margin-top: 18px; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  margin-top: 56px; background: var(--line); border-radius: var(--radius); overflow: hidden;
}
.stats div { background: var(--paper); padding: 22px 18px; }
.stats b { display: block; font-family: Georgia, serif; font-size: 30px; color: var(--pine); line-height: 1.1; }
.stats span { font-size: 14px; color: var(--ink-mute); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* --- сетки --- */
.grid { display: grid; gap: 18px; margin-top: 36px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.plain { background: transparent; box-shadow: none; padding: 0; }

/* --- шаги --- */
.steps { counter-reset: s; margin-top: 36px; display: grid; gap: 2px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.steps > li { background: var(--paper); padding: 24px 26px; list-style: none; counter-increment: s; }
.steps > li::before {
  content: counter(s); font-family: Georgia, serif; font-size: 15px;
  color: var(--pine); display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--sand);
  margin-right: 12px; vertical-align: 2px;
}
.steps h3 { display: inline; font-size: 19px; }
.steps p { margin: 10px 0 0 40px; color: var(--ink-soft); }
@media (max-width: 620px) { .steps p { margin-left: 0; } }

/* --- кейсы --- */
.case { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.case .niche { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.case h3 { margin: 6px 0 14px; }
.case ul { list-style: none; margin: 0 0 16px; padding: 0; }
.case li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.case li:last-child { border-bottom: 0; }
.case li b { font-weight: 600; color: var(--pine); white-space: nowrap; }
.case .result {
  margin: 0; padding: 14px 16px; background: var(--paper-2);
  border-radius: 10px; font-size: 15px; color: var(--ink);
}
.case .meta { font-size: 14px; color: var(--ink-mute); margin: 0 0 14px; }

/* --- FAQ --- */
details {
  border-bottom: 1px solid var(--line); padding: 20px 0;
}
details summary {
  cursor: pointer; font-family: Georgia, serif; font-size: 19px;
  list-style: none; display: flex; gap: 14px; align-items: flex-start;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; margin-left: auto; color: var(--clay); font-size: 22px; line-height: 1;
}
details[open] summary::after { content: "–"; }
details .answer { padding-top: 14px; color: var(--ink-soft); max-width: 70ch; }
details .answer p:last-child { margin-bottom: 0; }

/* --- выделенный блок --- */
.band { background: var(--paper-2); }
.band-dark {
  background: var(--pine); color: #f4f1e9; border-top: 0;
}
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark .lead, .band-dark p { color: rgba(244,241,233,.86); }
.band-dark a { color: #fff; border-bottom-color: rgba(255,255,255,.4); }
.band-dark .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.band-dark .btn-ghost:hover { color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .band-dark { background: #1f3528; }
}

/* --- подвал --- */
footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 26px; } }
footer h4 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 12px; font-weight: 600; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; }
footer a { color: var(--ink-soft); border-bottom: 0; }
footer a:hover { color: var(--clay); }
.requisites { color: var(--ink-mute); font-size: 14px; line-height: 1.6; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }

/* --- документы (политика, согласие) --- */
.doc { max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 80px; }
.doc h1 { font-size: clamp(28px, 4vw, 40px); }
.doc h2 { font-size: 24px; margin: 40px 0 12px; }
.doc h3 { font-size: 18px; margin: 26px 0 10px; }
.doc .rev { color: var(--ink-mute); font-size: 15px; margin-bottom: 32px; }
.doc ul, .doc ol { padding-left: 24px; }
.doc li { margin-bottom: 8px; }
.doc .clause { margin-bottom: 14px; }
.doc .note {
  background: var(--paper-2); border-left: 3px solid var(--clay);
  padding: 16px 18px; border-radius: 0 10px 10px 0; margin: 24px 0; font-size: 16px;
}
.doc table { width: 100%; border-collapse: collapse; margin: 20px 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 { color: var(--ink-mute); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.doc .back { display: inline-block; margin-bottom: 28px; font-size: 15px; }
.toc { background: var(--paper-2); border-radius: var(--radius); padding: 22px 26px; margin: 28px 0 40px; }
.toc h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 12px; }
.toc ol { margin: 0; padding-left: 22px; font-size: 16px; }
.toc li { margin-bottom: 6px; }
