/* =========================================================================
   OMK — база: переменные, reset, типографика, сетка, кнопки, формы
   ========================================================================= */

:root {
	/* Цвета */
	--dark:      #0B0E14;   /* основной тёмный фон (header, hero, footer) */
	--dark-2:    #11151F;   /* тёмный-вторичный */
	--dark-3:    #1A2130;   /* карточки на тёмном */
	--accent:    #CCFF00;   /* неоновый лаймовый акцент */
	--accent-2:  #B8E600;   /* hover */
	--accent-ink:#0B0E14;   /* текст на акценте */
	--white:     #FFFFFF;
	--bg-alt:    #F4F5F3;   /* светлый альтернативный фон */
	--text:      #17191B;   /* основной текст */
	--text-2:    #4B5563;   /* вторичный */
	--muted:     #8A93A6;   /* приглушённый (на тёмном) */
	--border:    #E5E7EB;   /* границы карточек */
	--border-dark: rgba(255,255,255,.12);

	/* Типографика */
	--font:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	--font-heading: 'Manrope', 'Inter', 'Segoe UI', system-ui, sans-serif;
	--font-mono: 'JetBrains Mono', 'Consolas', monospace;

	/* Геометрия */
	--radius:    10px;
	--radius-sm: 8px;
	--container: 1240px;
	--gutter:    24px;
	--header-h:  76px;

	/* Тени */
	--shadow: 0 1px 2px rgba(11,14,20,.04), 0 8px 24px rgba(11,14,20,.06);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	font-family: var(--font-heading);
	font-weight: 800;
	line-height: 1.15;
	color: var(--text);
	letter-spacing: -0.02em;
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: clamp(20px, 2.2vw, 24px); }
h4 { font-size: 18px; }

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* На тёмном фоне заголовки белые */
.dark, .dark h1, .dark h2, .dark h3, .dark h4 { color: var(--white); }

/* ---------- Контейнер ---------- */
.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* ---------- Типографические утилиты ---------- */
.section-title {
	margin-bottom: 16px;
}

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 40px;
}

.section-head h2 { margin-bottom: 0; }

.section-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 15px;
	color: var(--text);
	white-space: nowrap;
}
.section-link .icon { transition: transform .15s ease; }
.section-link:hover .icon { transform: translateX(4px); }
.section-link:hover { color: var(--dark); }

.dark .section-link { color: var(--white); }
.dark .section-link:hover { color: var(--accent); }

.mono {
	font-family: var(--font-mono);
	font-size: .92em;
	letter-spacing: .02em;
}

.lead {
	font-size: 18px;
	line-height: 1.6;
	color: var(--text-2);
	max-width: 640px;
}

.dark .lead { color: #AAB3C5; }

/* ---------- Кнопки ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 26px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	font-family: var(--font-heading);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
	white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-accent {
	background: var(--accent);
	color: var(--accent-ink);
}
.btn-accent:hover { background: var(--accent-2); color: var(--accent-ink); }

.btn-outline {
	background: transparent;
	color: var(--white);
	border-color: rgba(255,255,255,.4);
}
.btn-outline:hover { border-color: var(--white); color: var(--white); }

.btn-outline-dark {
	background: transparent;
	color: var(--text);
	border-color: var(--dark);
}
.btn-outline-dark:hover { background: var(--dark); color: var(--white); }

.btn-dark {
	background: var(--dark);
	color: var(--white);
}
.btn-dark:hover { background: var(--dark-3); color: var(--white); }

.btn-lg { padding: 17px 34px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Иконки ---------- */
.icon { flex: none; }

/* ---------- Формы ---------- */
.form-status { font-size: 14px; margin-top: 4px; min-height: 1.4em; }
.form-status.ok { color: var(--accent); }
.dark .form-status.ok { color: var(--accent); }
.form-status.err { color: #EF4444; }
.form-row { margin-bottom: 16px; }

.field {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--white);
	font-family: var(--font);
	font-size: 15px;
	color: var(--text);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.field::placeholder { color: #9CA3AF; }
.field:focus {
	outline: none;
	border-color: var(--dark);
	box-shadow: 0 0 0 3px rgba(11,14,20,.08);
}

textarea.field { min-height: 120px; resize: vertical; }

/* Поля на тёмном фоне (CTA-блок) */
.dark .field {
	background: rgba(255,255,255,.07);
	border-color: rgba(255,255,255,.22);
	color: var(--white);
}
.dark .field::placeholder { color: #8A93A6; }
.dark .field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(204,255,0,.15); }

.file-field {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border: 1px dashed rgba(255,255,255,.35);
	border-radius: var(--radius-sm);
	color: #AAB3C5;
	font-size: 14px;
	cursor: pointer;
	transition: border-color .15s ease;
}
.file-field:hover { border-color: var(--accent); color: var(--white); }
.file-field input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.checkbox-field {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	color: var(--muted);
	line-height: 1.45;
}
.checkbox-field input { margin-top: 3px; accent-color: var(--accent); }
.checkbox-field a { color: var(--muted); text-decoration: underline; }
.checkbox-field a:hover { color: var(--accent); }

/* ---------- Таблицы (технические параметры) ---------- */
.tech-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
.tech-table th, .tech-table td {
	text-align: left;
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}
.tech-table th {
	font-weight: 600;
	white-space: nowrap;
	width: 34%;
	color: var(--text-2);
	font-size: 14px;
}
.tech-table tr:last-child th, .tech-table tr:last-child td { border-bottom: none; }

/* ---------- FAQ ---------- */
.faq-item {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--white);
	margin-bottom: 12px;
	overflow: hidden;
}
.faq-item summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 20px 24px;
	font-weight: 600;
	font-size: 16px;
	cursor: pointer;
	list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
	content: '+';
	font-family: var(--font);
	font-size: 22px;
	font-weight: 400;
	color: var(--text-2);
	transition: transform .2s ease;
	flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 24px 20px; color: var(--text-2); }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
	padding: 18px 0;
	font-size: 13px;
	color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs-sep { margin: 0 8px; opacity: .5; }

/* ---------- Страница контента ---------- */
.page-content {
	padding: 16px 0 80px;
}
.page-content .container {
	max-width: 860px;
}
.page-content h2 { margin-top: 40px; }
.page-content h3 { margin-top: 28px; }
.page-content img { border-radius: var(--radius); margin: 24px 0; }
.page-content ul, .page-content ol { line-height: 1.7; }

/* Страницы page.php используют .section; контент сохраняет читаемую ширину */
.section .entry-content { max-width: 860px; }
.section .entry-content h2 { margin-top: 40px; }
.section .entry-content h3 { margin-top: 28px; }
.section .entry-content img { border-radius: var(--radius); margin: 24px 0; }
.section .entry-content ul, .section .entry-content ol { line-height: 1.7; }

/* Таблицы и широкий контент на мобильных: скролл внутри контейнера */
.entry-content { overflow-x: auto; }
.entry-content table { max-width: 100%; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { max-width: none; }

/* ---------- Сниппет/карточка статьи ---------- */
.article-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--white);
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.article-card .article-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card h3 { font-size: 18px; margin: 0; }
.article-card h3 a:hover { color: var(--dark); }
.article-card p { font-size: 14px; color: var(--text-2); margin: 0; }
.article-card .article-meta { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }

/* ---------- Анимация появления ---------- */
.reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .5s ease, transform .5s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.reveal { opacity: 1; transform: none; }
}
