/* ============================================================
   LPG-Smart · Блог — в фирменном стиле сайта
   Тёмная тема по умолчанию, светлая через html.light
   (тема общая с сайтом: localStorage['theme']).
   Шрифты: Unbounded (дисплей) + Mulish (текст).
   Палитра: фиолетовый #7c5cfc, бирюза #2dd4bf, золото #f59e0b.
   Подпись макета: линейка-«сантиметр» (замеры до/после).
   ============================================================ */

:root {
  --bg:        #0a0a0f;
  --dark:      #111118;
  --surface:   #16161f;
  --surface-2: #1c1c27;
  --line:      rgba(255,255,255,.07);
  --line-2:    rgba(255,255,255,.12);
  --ink:       #f0f0f5;
  --ink-soft:  #c2c2d0;
  --muted:     #6b6b80;

  --brand:     #7c5cfc;
  --brand-2:   #c084fc;
  --brand-ink: #c084fc;   /* для ссылок/акцентов на тёмном */
  --teal:      #2dd4bf;
  --gold:      #f59e0b;
  --glow:      rgba(124,92,252,.25);
  --brand-tint: rgba(124,92,252,.12);
  --teal-tint:  rgba(45,212,191,.10);

  --nav-bg:    rgba(10,10,15,.72);
  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.5);

  --measure:   42rem;
  --font-disp: "Unbounded", system-ui, sans-serif;
  --font-body: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html.light {
  --bg:        #f5f5fa;
  --dark:      #eeeef5;
  --surface:   #ffffff;
  --surface-2: #f2f2f8;
  --line:      rgba(0,0,0,.08);
  --line-2:    rgba(0,0,0,.14);
  --ink:       #0a0a0f;
  --ink-soft:  #34343f;
  --muted:     #6b6b80;

  --brand:     #7c5cfc;
  --brand-2:   #6a3fd4;
  --brand-ink: #6a3fd4;
  --teal:      #0d9488;
  --gold:      #d97706;
  --glow:      rgba(124,92,252,.15);
  --brand-tint: rgba(124,92,252,.08);
  --teal-tint:  rgba(13,148,136,.08);

  --nav-bg:    rgba(245,245,250,.85);
  --shadow:    0 1px 2px rgba(0,0,0,.05), 0 16px 40px rgba(16,16,31,.08);
  --shadow-lg: 0 24px 60px rgba(16,16,31,.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .25s ease, color .25s ease;
}

/* мягкое сияние на фоне, как на лендинге */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, var(--brand-tint) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 90% 10%, var(--teal-tint) 0%, transparent 60%);
}
body > * { position: relative; z-index: 1; }

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
::selection { background: var(--brand-tint); color: var(--ink); }

/* ---------- Прогресс чтения ---------- */
.read-progress {
  position: fixed; inset: 0 auto auto 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--teal));
  z-index: 200; transition: width .1s linear;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 76rem; margin: 0 auto;
  display: flex; align-items: center; gap: 1.25rem;
  padding: .9rem 2.5rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; border-radius: 8px; }
.brand .brand-name {
  font-family: var(--font-disp); font-weight: 800; letter-spacing: -.02em;
  font-size: 1.15rem; color: var(--ink);
}
.brand .tag {
  font-family: var(--font-disp); font-size: .62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em; color: var(--brand-2);
  border: 1px solid var(--line-2); border-radius: 999px; padding: .2rem .55rem;
}
.nav-spacer { flex: 1; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .88rem; transition: color .2s; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

.nav-cta {
  font-family: var(--font-disp); font-weight: 600; font-size: .82rem;
  background: var(--brand); color: #fff !important;
  padding: .6rem 1.2rem; border-radius: 999px;
  transition: background .2s, transform .15s;
}
.nav-cta:hover { background: #6a4de8; transform: translateY(-1px); text-decoration: none; }

.theme-toggle {
  appearance: none; cursor: pointer; position: relative;
  width: 46px; height: 26px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  transition: .25s; flex: none;
}
.theme-toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transition: transform .25s ease;
}
html.light .theme-toggle::after { transform: translateX(20px);
  background: linear-gradient(135deg, var(--gold), #fbbf24); }

/* ---------- Разделитель «сантиметр» ---------- */
.ruler {
  height: 12px; margin: 0; border: 0;
  background-image:
    linear-gradient(var(--line-2) 0 0),
    repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 13px);
  background-size: 100% 1px, 100% 12px;
  background-position: bottom, top;
  background-repeat: no-repeat, repeat-x;
  opacity: .7;
}

/* ---------- Обёртки ---------- */
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 2.5rem; }
.reading { max-width: var(--measure); margin: 0 auto; padding: 0 1.4rem; }

/* ---------- Хиро статьи ---------- */
.article-hero { padding: 3.4rem 0 1.8rem; border-bottom: 1px solid var(--line); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-disp); font-weight: 600; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .16em; color: var(--brand-2);
}
.eyebrow::before { content: ""; width: 1.5rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--teal)); }
.article-hero h1 {
  font-family: var(--font-disp); font-weight: 800; letter-spacing: -.03em;
  line-height: 1.14; font-size: clamp(1.8rem, 4.4vw, 2.9rem);
  margin: 1.1rem 0 1.1rem; color: var(--ink); max-width: 24ch;
}
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem;
  color: var(--muted); font-size: .9rem; font-weight: 600; }
.article-meta .sep { opacity: .5; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; font-weight: 600; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand-2); }

/* ---------- Тело статьи ---------- */
.article-body { padding: 2.6rem 0 1rem; }
.article-body > .reading > *:first-child { margin-top: 0; }
.article-body p { margin: 1.15rem 0; color: var(--ink-soft); }
.article-body .lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink); font-weight: 500; }
.article-body h2 {
  font-family: var(--font-disp); font-weight: 600; letter-spacing: -.02em; line-height: 1.28;
  font-size: clamp(1.35rem, 2.8vw, 1.7rem); margin: 2.7rem 0 .9rem; color: var(--ink);
  scroll-margin-top: 5rem;
}
.article-body h2 .idx { color: var(--brand-2); font-variant-numeric: tabular-nums;
  margin-right: .55rem; font-weight: 800; }
.article-body h3 { font-family: var(--font-disp); font-weight: 600; font-size: 1.12rem;
  margin: 1.9rem 0 .6rem; color: var(--ink); }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body ul, .article-body ol { margin: 1.1rem 0; padding-left: 0; }
.article-body li { list-style: none; position: relative; padding-left: 1.9rem;
  margin: .6rem 0; color: var(--ink-soft); }
.article-body ul li::before { content: ""; position: absolute; left: .35rem; top: .72em;
  width: .5rem; height: .5rem; border-radius: 3px;
  background: linear-gradient(135deg, var(--brand), var(--teal)); transform: rotate(45deg); }
.article-body ol { counter-reset: li; }
.article-body ol li { counter-increment: li; }
.article-body ol li::before {
  content: counter(li); position: absolute; left: 0; top: .05em;
  width: 1.4rem; height: 1.4rem; border-radius: 8px;
  background: var(--brand-tint); color: var(--brand-2);
  font-size: .78rem; font-weight: 800; font-family: var(--font-disp);
  display: grid; place-items: center;
}

/* Врезка «как это работает в LPG-Smart» */
.how {
  margin: 1.9rem 0; padding: 1.4rem 1.5rem 1.5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--teal); border-radius: var(--radius-sm);
}
.how .how-title {
  font-family: var(--font-disp); font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; font-size: 1rem;
}
.how .how-title::before { content: "⚙"; color: var(--teal); }
.how p { margin: .5rem 0; }
.how ul li::before { background: var(--teal); }

/* Цитата-акцент */
.pull {
  margin: 2.1rem 0; padding: 1.1rem 0 1.1rem 1.4rem;
  border-left: 3px solid var(--brand);
  font-family: var(--font-disp); font-weight: 600;
  font-size: 1.2rem; line-height: 1.42; color: var(--ink);
}

/* ---------- CTA ---------- */
.cta-card {
  margin: 2.8rem 0 1rem; padding: 2.1rem 2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-tint), var(--teal-tint));
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.cta-card h3 { font-family: var(--font-disp); font-weight: 800; letter-spacing: -.02em;
  font-size: 1.3rem; margin: 0 0 .5rem; color: var(--ink); }
.cta-card p { margin: 0 0 1.2rem; color: var(--ink-soft); }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-family: var(--font-disp);
  padding: .78rem 1.4rem; border-radius: 999px; font-size: .92rem;
  transition: transform .15s ease, background .2s, box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff;
  box-shadow: 0 8px 24px var(--glow); }
.btn-primary:hover { background: #6a4de8; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-2); background: transparent; margin-left: .6rem; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-2); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

/* ---------- Related ---------- */
.related { padding: 2.8rem 0 3.6rem; }
.related h2 { font-family: var(--font-disp); font-weight: 800; letter-spacing: -.02em;
  font-size: 1.25rem; margin: 0 0 1.2rem; color: var(--ink); }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.rel-card { display: block; padding: 1.2rem 1.25rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s; }
.rel-card:hover { text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow); border-color: var(--line-2); }
.rel-card .cat { font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--brand-2); font-family: var(--font-disp); }
.rel-card .t { font-family: var(--font-disp); font-weight: 600; color: var(--ink);
  margin: .5rem 0 0; font-size: .98rem; line-height: 1.32; }

/* ---------- Индекс блога ---------- */
.index-hero { padding: 4.4rem 0 2.6rem; border-bottom: 1px solid var(--line); }
.index-hero h1 { font-family: var(--font-disp); font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(2.1rem, 5.6vw, 3.4rem); line-height: 1.08;
  margin: .9rem 0 .9rem; color: var(--ink); max-width: 18ch; }
.index-hero h1 .hl { background: linear-gradient(135deg, var(--brand-2), var(--teal));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.index-hero p { font-size: 1.12rem; color: var(--ink-soft); max-width: 48ch; margin: 0; }

.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; padding: 2.8rem 0 4rem; }
.post-card { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s; }
.post-card:hover { text-decoration: none; transform: translateY(-4px);
  box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.post-thumb { height: 6px; background: linear-gradient(90deg, var(--brand), var(--teal)); }
.post-body { padding: 1.6rem 1.7rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.post-cat { align-self: flex-start; font-family: var(--font-disp);
  font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--brand-2); background: var(--brand-tint);
  padding: .3rem .7rem; border-radius: 999px; margin-bottom: .9rem; }
.post-card h2 { font-family: var(--font-disp); font-weight: 600; letter-spacing: -.02em;
  font-size: 1.28rem; line-height: 1.28; margin: 0 0 .6rem; color: var(--ink); }
.post-card p { margin: 0 0 1.1rem; color: var(--muted); font-size: .96rem; flex: 1; }
.post-meta { display: flex; align-items: center; gap: .6rem; color: var(--muted);
  font-size: .84rem; font-weight: 600; }
.post-meta .read-more { margin-left: auto; color: var(--brand-2); font-family: var(--font-disp); }

.post-card.featured { grid-column: 1 / -1; }
.post-card.featured .post-body { padding: 2.2rem; }
.post-card.featured h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); max-width: 22ch; }
.post-card.featured p { font-size: 1.06rem; max-width: 62ch; }

/* ---------- Подвал ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--dark);
  color: var(--muted); padding: 2.6rem 0; font-size: .9rem; }
.footer-in { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.footer-in a { color: var(--muted); font-weight: 600; }
.footer-in a:hover { color: var(--ink); }
.footer-in .fspace { flex: 1; }
.footer-eco a { color: var(--brand-2); }

/* ---------- Адаптив ---------- */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .nav { padding: .8rem 1.3rem; }
  .wrap { padding: 0 1.3rem; }
  .post-grid, .rel-grid { grid-template-columns: 1fr; }
  .nav-links a.hide-sm { display: none; }
  .article-hero { padding: 2.4rem 0 1.4rem; }
  .btn-ghost { margin-left: 0; }
}

/* ---------- Доступность ---------- */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Врезка «запуск под ключ» ---------- */
.eco {
  margin: 1.9rem 0; padding: 1.3rem 1.5rem;
  background: var(--surface); border: 1px solid var(--line-2);
  border-left: 3px solid #c0455c; border-radius: var(--radius-sm);
}
.eco .eco-k {
  font-family: var(--font-disp); font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin-bottom: .35rem;
}
.eco .eco-k::before { content: "✦"; color: #c0455c; }
.eco p { margin: .3rem 0 0; color: var(--ink-soft); }
.eco a { color: #c0455c; font-weight: 700; }
html.light .eco a { color: #8B1C2E; }
