/* =========================================================
   Голос Бренда — стили для подстраниц
   (юр. документы, кейсы, блог, 404, thanks)
   Использует переменные из styles.css
   ========================================================= */

/* ---- Header / Nav (статичный, без React) ---- */
.subnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 240, 232, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.subnav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}
.subnav .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.subnav .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--fg);
  flex-shrink: 0;
}
.subnav .logo-tag {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0;
  margin-left: 4px;
}
.subnav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.subnav-links a { color: var(--fg); transition: color 0.15s; }
.subnav-links a:hover { color: var(--accent); }
@media (max-width: 800px) {
  .subnav-links { display: none; }
}

/* ---- Page hero ---- */
.subpage-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.subpage-kicker {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-bottom: 24px;
}
.subpage-h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 18ch;
}
.subpage-h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}
.subpage-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 60ch;
  margin: 0;
}
.subpage-meta {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---- Content (legal docs, blog post body) ---- */
.doc-section {
  padding: 80px 0 120px;
}
.doc-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: 1fr; gap: 32px; }
}
.doc-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  font-size: 14px;
}
.doc-toc-h {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.doc-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: toc;
}
.doc-toc li {
  counter-increment: toc;
}
.doc-toc a {
  color: var(--fg-muted);
  display: flex;
  gap: 10px;
  line-height: 1.4;
  transition: color 0.15s;
}
.doc-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rule);
  flex-shrink: 0;
  padding-top: 2px;
}
.doc-toc a:hover { color: var(--fg); }

.doc-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
  max-width: 70ch;
}
.doc-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 56px 0 20px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body h2 .num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.doc-body h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  margin: 32px 0 12px;
}
.doc-body p { margin: 0 0 16px; color: var(--fg); }
.doc-body p strong { font-weight: 600; }
.doc-body a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  transition: border-color 0.15s;
}
.doc-body a:hover { border-bottom-color: var(--accent); }
.doc-body ul, .doc-body ol {
  margin: 0 0 20px;
  padding-left: 0;
  list-style: none;
}
.doc-body ul li, .doc-body ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
}
.doc-body ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 8px;
  height: 1px;
  background: var(--fg-muted);
}
.doc-body ol {
  counter-reset: doc;
}
.doc-body ol li {
  counter-increment: doc;
}
.doc-body ol li::before {
  content: counter(doc) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg-muted);
}

.doc-callout {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 15px;
  color: var(--fg-muted);
}

/* ---- Footer (статичный, без React) ---- */
.subfooter {
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: 56px 0 32px;
  font-size: 13px;
  color: var(--fg-muted);
}
.subfooter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.subfooter-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.subfooter a { transition: color 0.15s; }
.subfooter a:hover { color: var(--fg); }

/* ---- Cards (cases / blog list) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.card {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.18s;
  text-decoration: none;
  color: var(--fg);
  min-height: 320px;
}
.card:hover { background: var(--card); }
.card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 4px 0;
  color: var(--fg);
}
.card-body {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
  flex: 1;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.card-tag {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.18s;
}
.card:hover .card-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translate(2px, -2px);
}

/* ---- Filter chips ---- */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-chip {
  font-family: var(--sans);
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--fg); }
.filter-chip.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ---- Status / 404 / thanks ---- */
.status-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 800px) {
  .status-grid { grid-template-columns: 1fr; gap: 40px; }
}
.status-code {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(140px, 24vw, 320px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--fg);
  position: relative;
}
.status-code em {
  color: var(--accent);
  font-style: italic;
  font-weight: 300;
}
.status-h {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.status-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 50ch;
  margin: 0 0 32px;
}
.status-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Blog post body (readable text) ---- */
.post-body {
  max-width: 68ch;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
}
.post-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
}
.post-body h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 20px;
  margin: 32px 0 12px;
}
.post-body p { margin: 0 0 20px; }
.post-body blockquote {
  margin: 32px 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
  color: var(--fg);
  font-style: italic;
}
