/* ============================================================
   SmartPrawnik — BLOG BRAND restyle (spójność z premium serwisem)
   Mapuje generyczny ciemny Tailwind blog (bg-[#050a18], text-blue-300…)
   → edytorialny brand (Fraunces/krem/navy/złoto). Dostrojony pod realny DOM.
   Ładowany z fonts.css + premium.css + motion.js (nginx inject do /blog).
   ============================================================ */

:root {
  --bg: #F4F0E8; --bg-2: #FBF8F1; --bg-3: #EFE9DC;
  --ink: #0D1F3C; --ink-2: #3A4A68; --ink-3: #4D5872; --ink-muted: #6B5E48;
  --line: #D8CFBE; --line-2: #C4B89E;
  --accent: #B88746; --accent-dark: #8A5F2E; --accent-light: #E8D0A8;
}

/* --- BODY / sekcje #050a18 → warm-editorial --- */
html, body,
[class*="bg-[#050a18]"] {
  background: var(--bg) !important;
  color: var(--ink) !important;
}
body, [class*="font-body"], [class*="text-gray-100"] {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: var(--ink) !important; -webkit-font-smoothing: antialiased;
}
html.dark, html.dark body, html.dark [class*="bg-[#050a18]"] { background: #0E1217 !important; color: #ECE6DA !important; }

/* sticky nav: ciemny glass → kremowy glass */
[class*="backdrop-blur"][class*="sticky"], header[class*="sticky"], [class*="sticky"][class*="top-0"] {
  background: rgba(251,248,241,.82) !important;
  border-bottom: 1px solid var(--line) !important;
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
html.dark [class*="backdrop-blur"][class*="sticky"], html.dark [class*="sticky"][class*="top-0"] {
  background: rgba(14,18,23,.82) !important; border-bottom-color: #2A323D !important;
}

/* logo "SmartPrawnik" blue→emerald gradient → złoto */
[class*="from-blue-400"][class*="bg-clip-text"], [class*="from-blue-4"][class*="to-emerald-4"] {
  background-image: linear-gradient(100deg, var(--accent-dark), var(--accent) 55%, var(--accent-light)) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  font-family: 'Fraunces', Georgia, serif !important;
}

/* --- Nagłówki: Fraunces serif --- */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif !important;
  font-weight: 400 !important; letter-spacing: -.02em; color: var(--ink) !important; text-wrap: balance;
}
html.dark h1, html.dark h2, html.dark h3, html.dark h4 { color: #ECE6DA !important; }
h1, [class*="text-4xl"] { font-size: clamp(34px, 5vw, 52px) !important; line-height: 1.07 !important; }
h2 { font-size: clamp(24px, 3.4vw, 33px) !important; line-height: 1.14 !important; margin: 42px 0 14px !important; }
h3 { font-size: 21px !important; margin: 30px 0 10px !important; }
[class*="font-bold"], [class*="font-medium"] { font-weight: 500 !important; }

/* --- Kontener artykułu: rytm edytorialny (max-w-4xl→węższy do czytania) --- */
article, .blog-article, main > [class*="max-w-"] { max-width: 760px !important; }

/* --- Tekst body --- */
p, li {
  font-size: 17.5px !important; line-height: 1.72 !important; color: var(--ink-2) !important; text-wrap: pretty;
}
html.dark p, html.dark li { color: #BDB6A6 !important; }
p { margin: 0 0 18px !important; }
article p:first-of-type { font-size: 19px !important; color: var(--ink) !important; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin-bottom: 8px !important; }
strong, b { color: var(--ink) !important; font-weight: 600; }
html.dark strong, html.dark b { color: #ECE6DA !important; }

/* text-white / text-gray-400 (podtytuł, nav) → czytelny navy (NIE mono) */
[class*="text-white"]:not([class*="bg-"]), [class*="text-gray-400"], [class*="text-gray-300"] {
  color: var(--ink) !important;
}
html.dark [class*="text-white"]:not([class*="bg-"]), html.dark [class*="text-gray-400"] { color: #ECE6DA !important; }
nav a[class*="text-gray-400"], [class*="text-gray-400"][class*="hover"] { color: var(--ink-2) !important; }

/* --- Linki w treści: złote z animowanym podkreśleniem --- */
article a, .prose a, main p a, main li a {
  color: var(--accent-dark) !important;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .35s cubic-bezier(.22,.61,.36,1);
}
html.dark article a, html.dark main p a { color: var(--accent-light) !important; }
article a:hover, .prose a:hover, main p a:hover { background-size: 100% 1.5px; }

/* --- LISTA bloga: karty edytorialne (a.block.p-5 bg-white/[0.02]) --- */
a[href^="/blog/"] {
  background: var(--bg-2) !important; border: 1px solid var(--line-2) !important;
  border-radius: 4px !important; position: relative;
  box-shadow: 0 1px 2px rgba(13,31,60,.04), 0 8px 24px -18px rgba(13,31,60,.18) !important;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), box-shadow .4s ease, border-color .4s ease !important;
}
/* złota nić-akcent po lewej krawędzi karty */
a[href^="/blog/"]::before {
  content: ''; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-light)); opacity: 0; transition: opacity .35s ease;
}
@media (hover:hover) { a[href^="/blog/"]:hover::before { opacity: 1; } }
html.dark a[href^="/blog/"] { background: #161C24 !important; border-color: #2A323D !important; }
@media (hover:hover) {
  a[href^="/blog/"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px -24px rgba(13,31,60,.28), 0 3px 12px -8px rgba(184,135,70,.2) !important;
    border-color: var(--accent-light) !important;
  }
}
/* TYTUŁ karty (text-lg font-medium text-white …) → Fraunces navy, NIE mono/caps */
a[href^="/blog/"] [class*="text-lg"], a[href^="/blog/"] [class*="font-medium"] {
  font-family: 'Fraunces', Georgia, serif !important;
  font-size: 20px !important; font-weight: 500 !important; font-style: normal !important;
  text-transform: none !important; letter-spacing: -.01em !important;
  color: var(--ink) !important; background: none !important; line-height: 1.2 !important;
}
html.dark a[href^="/blog/"] [class*="text-lg"] { color: #ECE6DA !important; }
a[href^="/blog/"]:hover [class*="text-lg"] { color: var(--accent-dark) !important; }
html.dark a[href^="/blog/"]:hover [class*="text-lg"] { color: var(--accent-light) !important; }

/* --- Kategorie/badge: TYLKO pigułki (rounded-full) → złoto-pill mono.
   UWAGA: NIE używać gołego [class*="text-blue-3"] — łapie group-hover:text-blue-300 na tytułach. --- */
[class*="rounded-full"][class*="border"][class*="px-2"],
[class*="rounded-full"][class*="text-blue-3"], [class*="rounded-full"][class*="text-emerald-3"],
[class*="rounded-full"][class*="text-amber-3"], [class*="rounded-full"][class*="text-pink-3"],
[class*="rounded-full"][class*="text-purple-3"], [class*="rounded-full"][class*="text-cyan-3"],
[class*="rounded-full"][class*="text-orange-3"], [class*="rounded-full"][class*="text-red-3"],
[class*="rounded-full"][class*="text-gray-3"] {
  color: var(--accent-dark) !important;
  background: rgba(184,135,70,.10) !important;
  border-color: rgba(184,135,70,.30) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 10px !important; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 9px !important; border-radius: 99px !important;
}
html.dark [class*="rounded-full"][class*="border"][class*="px-2"],
html.dark [class*="rounded-full"][class*="text-blue-3"], html.dark [class*="rounded-full"][class*="text-emerald-3"] { color: var(--accent-light) !important; }

/* daty/meta drobne (text-gray-600/700, time) → mono muted */
time, [class*="text-gray-600"], [class*="text-gray-700"], [class*="text-xs"][class*="text-gray"] {
  font-family: 'JetBrains Mono', monospace !important; color: var(--ink-muted) !important;
}
html.dark time, html.dark [class*="text-gray-600"] { color: #8C8576 !important; }

/* blockquote / cytaty ustaw — premium złota linia */
blockquote, [class*="border-l-"] {
  border-left: 3px solid var(--accent) !important; padding: 4px 0 4px 20px !important;
  margin: 24px 0 !important; font-style: italic; color: var(--ink) !important; background: transparent !important;
}
html.dark blockquote, html.dark [class*="border-l-"] { color: #ECE6DA !important; }

/* karty/sekcje bg ciemne → brand */
[class*="bg-white/[0.0"], [class*="bg-white/5"] { background: var(--bg-2) !important; }
html.dark [class*="bg-white/[0.0"] { background: #161C24 !important; }
[class*="border-white/"] { border-color: var(--line) !important; }
html.dark [class*="border-white/"] { border-color: #2A323D !important; }

/* CTA przyciski */
a[class*="bg-gradient"][href*="czat"], a[class*="bg-blue"], button[class*="bg-blue"], [class*="bg-emerald-5"][href] {
  background: var(--accent) !important; color: #15110A !important; border: none !important;
}
