@layer base, components, utilities;

/* 1. БАЗОВАЯ СТАБИЛИЗАЦИЯ СИСТЕМЫ И ИСКЛЮЧЕНИЕ СДВИГОВ CLS */
html { 
  background-color: #000000; 
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  scroll-behavior: smooth;
}
body { 
  margin: 0; 
  padding: 0; 
  -webkit-font-smoothing: antialiased; 
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Приоритет контуров темы на уровне ядра */
.dark, .dark body { background-color: #020617 !important; color: #cbd5e1 !important; }
.light, .light body { background-color: #ffffff !important; color: #1e293b !important; }

/* Жесткий бруталистский каркас и невидимка */
#b2b-secure-engine { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; width: 100%; }
.b2b-secure-hide { display: none !important; }

/* 2. ГЕОМЕТРИЯ МОНОЛИТНОЙ ШАПКИ И СЕТКИ ХАБА */
header { position: sticky; top: 0; z-index: 50; background-color: #0f172a !important; border-bottom: 1px solid #1e293b; min-height: 73px; }
.max-w-7xl { max-w: 80rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.max-w-4xl { max-w: 56rem; margin-left: auto; margin-right: auto; }
.max-w-2xl { max-w: 42rem; margin-left: auto; margin-right: auto; }
.max-w-xs { max-w: 20rem; }

/* Флекс-контейнеры Квена */
.flex { display: flex; } 
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; } 
.justify-between { justify-content: space-between; } 
.justify-center { justify-content: center; }
.flex-grow { flex-grow: 1; } 
.shrink-0 { flex-shrink: 0; }

/* Отступы и интервалы */
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; }
.p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; } .py-12 { padding-top: 3rem; padding-bottom: 3rem; } .py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; } .py-3.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; } .py-0.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.pt-1 { padding-top: 0.25rem; } .pt-8 { padding-top: 2rem; } .pt-10 { padding-top: 2.5rem; } .pb-3 { padding-bottom: 0.75rem; } .pb-16 { padding-bottom: 4rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; } .mb-10 { margin-bottom: 2.5rem; } .mb-12 { margin-bottom: 3rem; } .mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mt-8 { margin-top: 2rem; } .mt-10 { margin-top: 2.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; } .space-y-2 > * + * { margin-top: 0.5rem; } .space-y-3 > * + * { margin-top: 0.75rem; } .border-l-4 { border-left-width: 4px; } .pl-4 { padding-left: 1rem; } .pl-3 { padding-left: 0.75rem; }

/* Сетка Grid */
.grid { display: grid; }
.w-full { width: 100%; } .w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; } .w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
.w-2 { width: 0.5rem; } .h-2 { height: 0.5rem; } .w-24 { width: 6rem; } .h-24 { height: 6rem; } .w-64 { width: 16rem; } .h-48 { height: 12rem; }

/* 3. ШРИФТЫ И ТЕКСТОВЫЕ КЛАССЫ */
.font-sans { font-family: system-ui, -apple-system, sans-serif; }
.font-mono { font-family: ui-monospace, SFMono-Regular, monospace; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }
.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.875rem; } .text-base { font-size: 1rem; } 
.text-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; } .text-4xl { font-size: 2.25rem; }
.uppercase { text-transform: uppercase; } .tracking-tight { letter-spacing: -0.025em; } .tracking-wider { letter-spacing: 0.05em; } .tracking-widest { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.625; } .text-center { text-align: left; }

/* 4. ЦВЕТА И ТЕМЫ ДЛЯ КОНКРЕТНЫХ БЛОКОВ */
.text-white { color: #ffffff !important; }
.bg-[#0f172a] { background-color: #0f172a !important; }
.bg-indigo-600 { background-color: #4f46e5 !important; color: #ffffff !important; }
.text-indigo-600 { color: #4f46e5 !important; }
.bg-emerald-500 { background-color: #10b981 !important; }
.bg-indigo-500 { background-color: #6366f1 !important; }
.bg-transparent { background-color: transparent !important; }

/* Контур СВЕТЛОЙ темы */
.light h2, .light h3, .light h4 { color: #0f172a !important; }
.light p { color: #334155 !important; }
.light article, .light table { background-color: #ffffff !important; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15) !important; }
.light .bg-slate-100 { background-color: #f1f5f9 !important; }
.light .text-slate-900 { color: #0f172a !important; }
.light .text-slate-800 { color: #1e293b !important; }
.light .text-slate-700 { color: #334155 !important; }
.light .text-slate-600 { color: #475569 !important; }
.light .text-slate-400 { color: #94a3b8 !important; }
.light .bg-slate-50 { background-color: #f8fafc !important; }
.light .divide-slate-200 > * + * { border-color: #e2e8f0 !important; }
.light .border-slate-200 { border-color: #e2e8f0 !important; }
.light .border-slate-300 { border-color: #cbd5e1 !important; }
.light .border-slate-400 { border-color: #94a3b8 !important; }

/* Динамический контраст кнопки темы в СВЕТЛОМ контуре */
.light #theme-toggle { background-color: #0f172a !important; color: #ffffff !important; border-color: #1e293b !important; }
.light #theme-toggle:hover { background-color: #1e293b !important; }

/* Контур ТЕМНОЙ темы */
.dark h2, .dark h3, .dark h4 { color: #f1f5f9 !important; }
.dark p { color: #94a3b8 !important; }
.dark article, .dark table { background-color: #0f172a !important; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5) !important; }
.dark .text-slate-300 { color: #cbd5e1 !important; }
.dark .text-slate-400 { color: #94a3b8 !important; }
.dark .text-slate-500 { color: #64748b !important; }
.dark .dark\:bg-slate-950 { background-color: #020617 !important; }
.dark .dark\:bg-slate-900 { background-color: #0f172a !important; }
.dark .dark\:bg-slate-950\/30 { background-color: rgba(2, 6, 23, 0.3) !important; }
.dark .dark\:bg-slate-950\/40 { background-color: rgba(2, 6, 23, 0.4) !important; }
.dark .dark\:text-slate-100 { color: #f1f5f9 !important; }
.dark .dark\:text-slate-300 { color: #cbd5e1 !important; }
.dark .dark\:text-slate-400 { color: #94a3b8 !important; }
.dark .dark\:text-emerald-400 { color: #34d399 !important; }
.dark .dark\:text-indigo-400 { color: #818cf8 !important; }
.dark .dark\:divide-slate-800\/50 > * + * { border-color: rgba(30, 41, 59, 0.5) !important; }
.dark .border-slate-800 { border-color: #1e293b !important; }
.dark .dark\:border-slate-700\/40 { border-color: rgba(51, 65, 85, 0.4) !important; }

/* Динамический контраст кнопки темы в ТЕМНОМ контуре */
.dark #theme-toggle { background-color: #ffffff !important; color: #020617 !important; border-color: #cbd5e1 !important; }
.dark #theme-toggle:hover { background-color: #e2e8f0 !important; }

/* Кнопки закупки, ИЖС и интерактивные переходы */
.bg-slate-800 { background-color: #1f2937 !important; color: #e5e7eb !important; border: 1px solid #374151 !important; transition: background-color 0.2s ease; }
.bg-slate-800:hover { background-color: #374151 !important; color: #ffffff !important; }
.active\:scale-\[0.99\]:active { transform: scale(0.99); }
.rounded-lg { border-radius: 0.5rem; } .rounded-full { border-radius: 9999px; } .rounded { border-radius: 0.25rem; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); } .shadow-indigo-900\/20 { box-shadow: 0 10px 15px -3px rgba(30, 27, 75, 0.2); }

/* Исправление ссылок-кнопок HERO (ИЖС и Юрлица) */
a.bg-indigo-600 { background-color: #4f46e5 !important; color: #ffffff !important; transition: background-color 0.2s ease; }
a.bg-indigo-600:hover { background-color: #4338ca !important; }
a.border-slate-400 { border: 1px solid #94a3b8 !important; transition: all 0.2s ease; }

.light a.border-slate-400:hover { background-color: #e2e8f0 !important; color: #0f172a !important; border-color: #cbd5e1 !important; }
.dark a.border-slate-400:hover { background-color: #1e293b !important; color: #ffffff !important; border-color: #475569 !important; }

/* 5. ИНТЕРАКТИВНЫЕ B2B КОНТУРЫ КВЕНА */
.b2b-border { border: 1px solid #1e293b; }
.dark .b2b-border { border-color: #1e293b; }
.light .b2b-border { border-color: #cbd5e1; }
.b2b-hover { transition: all 0.3s ease; }
.b2b-hover:hover { border-color: #4f46e5 !important; }
.dark .b2b-hover:hover { background-color: #0f172a !important; }
.light .b2b-hover:hover { background-color: #f1f5f9 !important; }

/* Мосты и Таблицы МИКАС */
.overflow-x-auto { overflow-x: auto; } .text-left { text-align: left; }
.divide-y > * + * { border-top-width: 1px; }
.group:hover .group-hover\:scale-110 { transform: scale(1.1); }
.group:hover .group-hover\:underline { text-decoration: underline; }
.group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }
.decoration-dotted { text-decoration-style: dotted; } .underline-offset-4 { text-underline-offset: 4px; }
.hidden-seo-layer summary::-webkit-details-marker { display: none; }
.text-emerald-600 { color: #059669; }

/* 6. СЛАЙДЕР ЗОНА И АНИМАЦИЯ НА 12 СЕКУНД */
.slider-zone { position: relative; width: 100%; height: 380px; overflow: hidden; border-radius: 0.5rem; background-color: #000000; }
