/* Articles — shared styles for SEO pages
   Based on Lunaris Design System (same tokens as landing page)
   ============================================================ */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Lunaris DS tokens */
:root {
  --primary: #2563EB;
  --primary-foreground: #FFFFFF;
  --background: #F2F3F0;
  --foreground: #111111;
  --card: #FFFFFF;
  --card-foreground: #111111;
  --muted: #F2F3F0;
  --muted-foreground: #666666;
  --secondary: #E7E8E5;
  --secondary-foreground: #111111;
  --accent: #F2F3F0;
  --accent-foreground: #111111;
  --border: #CBCCC9;
  --input: #CBCCC9;
  --destructive: #D93C15;
  --black: #000000;
  --white: #FFFFFF;
  --color-error: #E5DCDA;
  --color-error-foreground: #8C1C00;
  --color-warning: #E9E3D8;
  --color-warning-foreground: #804200;
  --color-info: #DFDFE6;
  --color-info-foreground: #000066;
  --color-success: #DFE6E1;
  --color-success-foreground: #004D1A;
  --radius-m: 16px;
  --radius-pill: 999px;
  --font-primary: 'JetBrains Mono', monospace;
  --font-secondary: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111111;
    --foreground: #FFFFFF;
    --card: #1A1A1A;
    --card-foreground: #FFFFFF;
    --muted: #2E2E2E;
    --muted-foreground: #B8B9B6;
    --secondary: #2E2E2E;
    --secondary-foreground: #FFFFFF;
    --accent: #111111;
    --accent-foreground: #F2F3F0;
    --border: #2E2E2E;
    --input: #2E2E2E;
    --destructive: #FF5C33;
    --color-error: #24100B;
    --color-error-foreground: #FF5C33;
    --color-warning: #291C0F;
    --color-warning-foreground: #FF8400;
    --color-info: #222229;
    --color-info-foreground: #B2B2FF;
    --color-success: #222924;
    --color-success-foreground: #B6FFCE;
  }
}

/* Base */
html { scroll-behavior: smooth; }
body { font-family: var(--font-secondary); color: var(--foreground); background: var(--background); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.article-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.article-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
}
.article-header__brand-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #F8ACFF;
  display: flex; align-items: center; justify-content: center;
}
.article-header__brand-icon svg { width: 16px; height: 16px; color: var(--black); }
.article-header__back {
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--muted-foreground);
  text-decoration: none;
}
.article-header__back:hover { color: var(--foreground); text-decoration: none; }

/* ── Article layout ── */
.article-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 80px 80px;
}

/* ── Article hero ── */
.article-hero {
  margin-bottom: 48px;
}
.article-hero__label {
  font-family: var(--font-primary);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--primary);
  font-weight: 500;
  display: block;
  margin-bottom: 16px;
}
.article-hero h1 {
  font-family: var(--font-primary);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.article-hero__meta {
  font-size: 14px;
  color: var(--muted-foreground);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.article-hero__image {
  width: 100%;
  border-radius: var(--radius-m);
  margin-top: 32px;
}

/* ── Prose ── */
.article-content h2 {
  font-family: var(--font-primary);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin: 48px 0 16px;
}
.article-content h3 {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.article-content p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--foreground);
}
.article-content ul, .article-content ol {
  margin: 0 0 16px 24px;
  line-height: 1.7;
}
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--muted);
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  color: var(--muted-foreground);
}
.article-content strong { font-weight: 600; }
.article-content a { color: var(--primary); text-decoration: underline; }
.article-content a:hover { opacity: 0.8; }

/* ── Tables ── */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.article-content th {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  background: var(--muted);
  border-bottom: 2px solid var(--border);
}
.article-content td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.article-content tr:hover { background: var(--muted); }

/* ── Info / warning / success cards ──
   СТРУКТУРА: первый <strong> — заголовок карточки (display: block, отдельная строка).
   Любые <strong> после — обычный inline-bold в теле текста. Селектор `:first-child`
   применяет block-стиль ТОЛЬКО к заголовку, чтобы inline-bold в теле не ломал верстку.
   Пример:
     <div class="warning-card">
       <strong>Заголовок карточки</strong>            ← станет блочным
       Тело текста с <strong>inline-bold</strong>.    ← останется inline
     </div>
*/
.info-card {
  background: var(--color-info);
  color: var(--color-info-foreground);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.6;
}
.info-card > strong:first-child { display: block; margin-bottom: 8px; }

.warning-card {
  background: var(--color-warning);
  color: var(--color-warning-foreground);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.6;
}
.warning-card > strong:first-child { display: block; margin-bottom: 8px; }

.success-card {
  background: var(--color-success);
  color: var(--color-success-foreground);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.6;
}
.success-card > strong:first-child { display: block; margin-bottom: 8px; }

/* ── Table of Contents ── */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}
.toc h3 {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: 1px;
  color: var(--muted-foreground);
}
.toc ol {
  margin: 0;
  padding-left: 20px;
}
.toc li {
  margin-bottom: 6px;
  font-size: 15px;
}
.toc a {
  color: var(--foreground);
  text-decoration: none;
}
.toc a:hover { color: var(--primary); }

/* ── CTA block ── */
.article-cta {
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius-m);
  padding: 40px 48px;
  text-align: center;
  margin: 48px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.article-cta h2 {
  font-family: var(--font-primary);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-foreground);
  margin: 0;
}
.article-cta p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 600px;
  color: var(--primary-foreground);
}
.article-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  background: var(--white);
  color: var(--primary);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.article-cta .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  text-decoration: none;
}

/* ── FAQ ── */
.faq-section { margin: 48px 0; }
.faq-section > h2 { margin-top: 0; }
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  gap: 16px;
}
.faq-q .faq-chevron {
  width: 16px; height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--foreground);
}
.faq-item.open .faq-q .faq-chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a p { padding: 0 0 16px; font-size: 14px; color: var(--muted-foreground); line-height: 1.6; }

/* ── Footer (same as landing) ── */
.footer { background: var(--black); color: #fff; padding: 48px 80px; }
.footer__inner { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.footer__top { display: flex; justify-content: space-between; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-primary); font-size: 18px; font-weight: 700; }
.footer__brand-icon { width: 28px; height: 28px; border-radius: 50%; background: #F8ACFF; position: relative; display: flex; align-items: center; justify-content: center; }
.footer__brand-icon svg { width: 16px; height: 16px; color: var(--black); }
.footer__divider { height: 1px; background: var(--border); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted-foreground); }
.footer__legal { display: flex; gap: 20px; }
.footer__legal a { color: var(--muted-foreground); text-decoration: none; }
.footer__legal a:hover { color: #fff; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .article-header { padding: 16px 24px; }
  .article-wrapper { padding: 32px 24px 48px; }
  .article-hero h1 { font-size: 28px; }
  .article-content h2 { font-size: 22px; margin-top: 32px; }
  .article-content h3 { font-size: 18px; }
  .article-cta { padding: 32px 24px; }
  .article-cta h2 { font-size: 20px; }
  .footer { padding: 32px 24px; }
  .footer__top, .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer__legal { flex-direction: column; align-items: center; gap: 8px; }
  .article-content table { font-size: 13px; }
  .article-content th, .article-content td { padding: 8px 10px; }
}
