/* PixelPop blog — статичные стили без сборки.
   Стиль синхронизирован с основным сайтом (бренд-градиент pink → violet → cyan).
*/
:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --fg: #0b0b0f;
  --muted: #5a5a6a;
  --border: #e6e6ee;
  --card: #ffffff;
  --brand-violet: #7c3aed;
  --brand-pink: #ec4899;
  --brand-cyan: #06b6d4;
  --brand-gradient: linear-gradient(135deg, #ec4899 0%, #7c3aed 50%, #06b6d4 100%);
  --shadow-glow: 0 18px 50px -20px rgba(124, 58, 237, .35);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a10; --bg-soft: #0e0e16; --fg: #f5f5fa; --muted: #9a9aae;
    --border: #1f1f2e; --card: #14141d;
    --shadow-glow: 0 18px 60px -20px rgba(124, 58, 237, .55);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative; overflow-x: hidden;
}
/* Декоративные «пятна» как на главной */
body::before, body::after {
  content: ""; position: fixed; pointer-events: none; z-index: -1;
  width: 420px; height: 420px; border-radius: 50%;
  filter: blur(80px); opacity: .25;
}
body::before { left: -120px; top: -120px; background: var(--brand-pink); }
body::after  { right: -120px; top: 160px; background: var(--brand-violet); opacity: .2; }

a { color: var(--brand-violet); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; }
code { background: color-mix(in oklab, var(--bg) 80%, var(--brand-violet) 8%);
  padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }

/* Header — повторяет логику src/components/site-header.tsx */
.pp-header {
  max-width: 1100px; margin: 0 auto; padding: 20px 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pp-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 900; letter-spacing: -0.02em; font-size: 18px; color: var(--fg);
}
.pp-logo .pp-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--brand-gradient); color: #fff;
  box-shadow: var(--shadow-glow);
}
.pp-logo .pp-mark svg { width: 16px; height: 16px; }
.pp-logo span.pp-name-grad {
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.pp-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pp-nav a {
  color: var(--muted); font-size: 13px; white-space: nowrap;
  transition: color .15s ease;
}
.pp-nav a:hover { color: var(--fg); text-decoration: none; }
.pp-nav .pp-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--card);
  padding: 6px 10px; border-radius: 10px; font-size: 12px; color: var(--fg);
}
.pp-nav .pp-nav-btn:hover { background: color-mix(in oklab, var(--card) 85%, var(--brand-violet) 6%); }

.pp-container { max-width: 760px; margin: 0 auto; padding: 12px 20px 60px; }

.pp-hero {
  position: relative; overflow: hidden;
  background: var(--brand-gradient); color: white;
  border-radius: 28px; padding: 40px 28px; margin: 16px 0 32px;
  box-shadow: var(--shadow-glow);
}
.pp-hero::after {
  content: ""; position: absolute; inset: -40%;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 40%);
  pointer-events: none;
}
.pp-hero h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 900; }
.pp-hero p { opacity: .94; margin: 12px 0 0; max-width: 560px; }

h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 900; }
h2 { font-size: 22px; margin: 36px 0 12px; letter-spacing: -0.01em; font-weight: 800; }
h3 { font-size: 18px; margin: 24px 0 8px; font-weight: 700; }
p { color: var(--fg); }
.pp-muted { color: var(--muted); }

ol, ul { padding-left: 22px; }
li { margin: 6px 0; }

.pp-card {
  border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 18px; margin: 16px 0; background: var(--card);
}
.pp-callout {
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--brand-pink) 10%, transparent),
                            color-mix(in oklab, var(--brand-violet) 10%, transparent));
  border: 1px solid color-mix(in oklab, var(--brand-violet) 30%, transparent);
  border-radius: 16px; padding: 16px 18px; margin: 18px 0;
}

.pp-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  background: var(--brand-gradient); color: white !important;
  padding: 12px 22px; border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow-glow);
  transition: transform .15s ease, opacity .15s ease;
}
.pp-cta:hover { text-decoration: none; opacity: .92; transform: translateY(-1px); }

.pp-grid {
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.pp-post-card {
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  background: var(--card);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pp-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px -22px rgba(0,0,0,.25);
  border-color: color-mix(in oklab, var(--brand-violet) 35%, var(--border));
}
.pp-post-card a { color: inherit; display: block; }
.pp-post-card .pp-thumb { aspect-ratio: 16 / 9; background: var(--brand-gradient); }
.pp-post-card .pp-body { padding: 16px 18px; }
.pp-post-card h3 { margin: 0 0 6px; font-size: 17px; }
.pp-post-card p { color: var(--muted); margin: 0; font-size: 14px; }

.pp-figure { margin: 20px 0; }
.pp-figure figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; text-align: center; }

/* Картинка-заголовок поста */
.pp-post-hero {
  width: 100%; max-height: 360px; object-fit: cover;
  border-radius: 22px; margin: 8px 0 24px;
  box-shadow: var(--shadow-glow);
}

/* Пара картинок «разный размер» (для увеличения фото) */
.pp-size-compare {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 18px; padding: 18px; margin: 20px 0;
}
.pp-size-compare figure { margin: 0; text-align: center; }
.pp-size-compare figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; }
.pp-size-compare img { display: block; margin: 0 auto; border-radius: 12px; }
.pp-size-compare .pp-size-before img { width: 128px; image-rendering: pixelated; }
.pp-size-compare .pp-size-after  img { width: 100%; max-width: 480px; height: auto; }
@media (max-width: 560px) {
  .pp-size-compare { grid-template-columns: 1fr; }
}

.pp-footer {
  max-width: 1100px; margin: 40px auto 24px; padding: 0 20px;
  color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid var(--border); padding-top: 20px;
}

/* Слайдер «до / после» */
.pp-compare {
  position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 720px;
  margin: 20px auto; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border);
  background: repeating-conic-gradient(#e5e5ec 0% 25%, #f6f6fa 0% 50%) 50% / 24px 24px;
  user-select: none; touch-action: none; cursor: ew-resize;
}
.pp-compare img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0; display: block; pointer-events: none;
}
.pp-compare-before { z-index: 1; }
.pp-compare-after  { z-index: 2; clip-path: inset(0 0 0 var(--pp-x, 50%)); }
.pp-compare-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pp-x, 50%);
  width: 3px; background: white; z-index: 3; transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.15), 0 6px 24px rgba(0,0,0,.25);
  pointer-events: none;
}
.pp-compare-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 999px; background: white;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  display: grid; place-items: center; color: #0b0b0f; font-size: 18px; font-weight: 900;
}
.pp-compare-handle span::before { content: "⇆"; }
.pp-compare-label {
  position: absolute; top: 12px; z-index: 4;
  background: rgba(0,0,0,.6); color: white; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase;
  pointer-events: none;
}
.pp-compare-label--before { left: 12px; }
.pp-compare-label--after  { right: 12px; }
