/* ============================================================
   inner-dark.css — тёмная тема внутренних страниц молоко/
   под motion-дизайн главной. Оверрайд поверх Tailwind (Vite).
   ============================================================ */
@import url('/v3/css/fonts.css');

.theme-dark{
  --ink:#EDE4D1; --muted:#a7a196; --faint:#7f7a71;
  --bg:#07080B; --surface:#0e1016; --surface2:#14161e; --stroke:rgba(255,255,255,.09);
  --stroke-hi:rgba(255,255,255,.16); --accent:#FF6A2B;
  background-color:var(--bg) !important; color:var(--ink);
}

/* дисплейный шрифт заголовков — как на главной */
.theme-dark h1, .theme-dark h2{ font-family:'Unbounded',system-ui,sans-serif; letter-spacing:-.015em; }
.theme-dark h1{ color:var(--ink); }

/* ---- поверхности (любые bg-white*, светло-серые) ---- */
.theme-dark [class*="bg-white"]{ background-color:var(--surface) !important; }
.theme-dark .bg-gray-50,.theme-dark .bg-gray-100,.theme-dark .bg-slate-50,.theme-dark .bg-slate-100,.theme-dark .bg-neutral-50,.theme-dark .bg-zinc-50{ background-color:var(--surface) !important; }
.theme-dark .bg-gray-900,.theme-dark .bg-black,.theme-dark .bg-slate-900{ background-color:#05060a !important; }

/* ---- текст ---- */
.theme-dark .text-dark,.theme-dark .text-gray-900,.theme-dark .text-gray-800,.theme-dark .text-black,.theme-dark .text-slate-900,.theme-dark .text-slate-800{ color:var(--ink) !important; }
.theme-dark .text-gray-700,.theme-dark .text-gray-600,.theme-dark .text-gray-500,.theme-dark .text-slate-600,.theme-dark .text-slate-500{ color:var(--muted) !important; }
.theme-dark .text-gray-400,.theme-dark .text-gray-300,.theme-dark .text-slate-400{ color:var(--faint) !important; }

/* ---- границы / разделители ---- */
.theme-dark .border-gray-100,.theme-dark .border-gray-200,.theme-dark .border-gray-300,.theme-dark .border-slate-100,.theme-dark .border-slate-200{ border-color:var(--stroke) !important; }
.theme-dark [class*="divide-gray"] > * + *,.theme-dark [class*="divide-slate"] > * + *{ border-color:var(--stroke) !important; }
.theme-dark hr{ border-color:var(--stroke) !important; }

/* ---- шапка (fixed, была bg-white/90) ---- */
.theme-dark header{ background-color:rgba(7,8,11,.82) !important; border-bottom-color:var(--stroke) !important; }
.theme-dark header [class*="bg-white"]{ background-color:rgba(7,8,11,.94) !important; }

/* ---- карточки: тонкая рамка + мягкая тень на тёмном ---- */
.theme-dark .rounded-xl[class*="border"],.theme-dark .rounded-2xl[class*="border"],.theme-dark .rounded-3xl[class*="border"]{ box-shadow:0 12px 34px rgba(0,0,0,.35); }
.theme-dark [class*="bg-white"].rounded-xl,.theme-dark [class*="bg-white"].rounded-2xl,.theme-dark [class*="bg-white"].rounded-3xl{ border:1px solid var(--stroke); box-shadow:0 14px 40px rgba(0,0,0,.4); }

/* ---- формы ---- */
.theme-dark input,.theme-dark textarea,.theme-dark select{ background-color:var(--surface2) !important; color:var(--ink) !important; border-color:var(--stroke-hi) !important; }
.theme-dark input::placeholder,.theme-dark textarea::placeholder{ color:#6c675f !important; }
.theme-dark input:focus,.theme-dark textarea:focus,.theme-dark select:focus{ border-color:var(--accent) !important; outline:none; box-shadow:0 0 0 3px rgba(255,106,43,.18) !important; }
.theme-dark select option{ background:#14161e; color:var(--ink); }
.theme-dark label{ color:var(--muted) !important; }

/* ---- акценты остаются оранжевыми ---- */
.theme-dark .text-primary{ color:var(--accent) !important; }
.theme-dark .bg-primary{ background-color:var(--accent) !important; }

/* ---- статьи блога (проза) ---- */
.theme-dark article p,.theme-dark .prose p,.theme-dark .prose li{ color:#c9c3b8 !important; }
.theme-dark pre,.theme-dark code{ background:#14161e !important; color:#EDE4D1 !important; border:1px solid var(--stroke); }
.theme-dark blockquote{ border-left-color:var(--accent) !important; color:var(--muted) !important; }

/* мелкие «чипы»/бейджи на светлом фоне */
.theme-dark .bg-orange-50,.theme-dark .bg-orange-100{ background-color:rgba(255,106,43,.12) !important; }

/* ---- градиентные hero-подложки (from-*/to-white/orange-50 → тёмные) ---- */
.theme-dark [class*="bg-gradient"]{
  --tw-gradient-from:#07080B !important; --tw-gradient-via:#0a0c11 !important; --tw-gradient-to:#0e1016 !important;
  --tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-via),var(--tw-gradient-to) !important;
  background-color:var(--bg) !important;
}
.theme-dark .from-white,.theme-dark .from-gray-50,.theme-dark .from-gray-100,.theme-dark .from-slate-50,.theme-dark .from-orange-50,.theme-dark .from-primary\/5{ --tw-gradient-from:#07080B !important; }
.theme-dark .via-white,.theme-dark .via-gray-50,.theme-dark .via-orange-50{ --tw-gradient-via:#0a0c11 !important; }
.theme-dark .to-white,.theme-dark .to-gray-50,.theme-dark .to-gray-100,.theme-dark .to-slate-50,.theme-dark .to-orange-50{ --tw-gradient-to:#0e1016 !important; }
/* одноцветные светлые секции без bg-white */
.theme-dark section[class*="bg-orange-50"],.theme-dark .bg-orange-50\/50{ background-color:#0a0c11 !important; }

/* защита от фантомного горизонтального оверфлоу (юр-страницы) */
.theme-dark{ overflow-x:hidden; }
.theme-dark img,.theme-dark table,.theme-dark pre{ max-width:100%; }

/* длинные слова в заголовках переносим (Unbounded широкий) */
.theme-dark h1,.theme-dark h2,.theme-dark h3{ overflow-wrap:break-word; word-break:break-word; hyphens:auto; }
