/*
 * Оформление статей журнала (записи типа post).
 * Подключается в functions.php только на single post, после main.css.
 * Фон страницы статьи, списки, таблицы, ссылки и нативные рекламные блоки.
 * Правила блоков: docs/native-blocks.md в корне рабочей копии.
 */

/* Фон: светло-бежевый вместо бумажной текстуры и розовых мазков */
.article {
	background: #fcf9f1;
	padding-bottom: 70px;
}

/* Читаемость текста */
.article-content {
	font-size: 18px;
	line-height: 1.65;
}
.article-content h3,
.article-content h4 {
	margin: 40px 0 16px;
}
.article-content > h3:first-child {
	margin-top: 0;
}

/* Вводные абзацы перед списками: жирнее, чтобы список читался как продолжение.
   Класс ставит сборка статьи, :has() покрывает старые записи.
   Правила раздельные: браузер без :has() отбросит только своё. */
.article-content p.omf-lead {
	font-weight: 600;
}
.article-content > p:has(+ ul),
.article-content > p:has(+ ol) {
	font-weight: 600;
}

/* Ссылки в тексте: темнее и с подчёркиванием, чтобы не терялись */
.article-content a:not(.omf-native__btn) {
	color: #9c3f44;
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	font-weight: 500;
}
.article-content a:not(.omf-native__btn):hover,
.article-content a:not(.omf-native__btn):focus-visible {
	color: #30431e;
}

/* Списки: в main.css у li стоит display:block, из-за чего пропадали маркеры */
.article-content ul,
.article-content ol {
	margin: 0 0 25px;
	padding: 0 0 0 1.5em;
}
.article-content ul {
	list-style: disc outside;
}
.article-content ol {
	list-style: decimal outside;
}
.article-content li {
	display: list-item;
	margin: 0 0 8px;
	padding-left: 4px;
}
.article-content li::marker {
	color: #d88688;
}
.article-content ol li::marker {
	color: #30431e;
	font-weight: 600;
}
.article-content li > ul,
.article-content li > ol {
	margin: 8px 0 0;
}

/* Таблицы */
.article-content table {
	width: 100%;
	margin: 10px 0 30px;
	border-collapse: separate;
	border-spacing: 0;
	background: #fffdf8;
	border: 1px solid #e4d9bf;
	border-radius: 18px;
	overflow: hidden;
	font-size: 16px;
	line-height: 1.45;
}
.article-content th {
	padding: 14px 18px;
	background: #30431e;
	color: #fff;
	font-family: "IBM Plex Mono", monospace;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	text-align: left;
	text-transform: uppercase;
}
.article-content td {
	padding: 14px 18px;
	border-top: 1px solid #eee4cd;
	vertical-align: top;
}
.article-content tbody tr:nth-child(even) td {
	background: #faf5e9;
}
.article-content td:first-child {
	font-weight: 600;
}
@media (max-width: 767px) {
	.article-content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.article-content th,
	.article-content td {
		min-width: 130px;
		padding: 12px 14px;
	}
}

/* Иллюстрации */
.article-content figure {
	margin: 0 0 30px;
}
.article-content figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 20px;
}
.article-content .omf-photo-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(8px, 2vw, 18px);
	margin: 24px 0 32px;
}
.article-content .omf-photo-grid figure {
	min-width: 0;
	margin: 0;
}

/* Нативные рекламные блоки */
.article-content .omf-native {
	position: relative;
	margin: 40px 0;
	padding: 32px 36px;
	border-radius: 26px;
	overflow: hidden;
}
.article-content .omf-native .omf-native__title {
	margin: 0 0 12px;
	font-family: "IBM Plex Mono", monospace;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
}
.article-content .omf-native .omf-native__text {
	margin: 0 0 20px;
	max-width: 620px;
}
.article-content .omf-native .omf-native__prices {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}
.article-content .omf-native .omf-native__prices li {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	margin: 0;
	padding: 9px 18px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	font-size: 16px;
	line-height: 1.2;
}
.article-content .omf-native .omf-native__prices li::marker {
	content: "";
}
.article-content .omf-native .omf-native__prices b {
	color: #e9bb72;
	font-size: 20px;
	font-weight: 600;
	white-space: nowrap;
}
.article-content .omf-native .omf-native__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}
.article-content a.omf-native__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 28px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-family: "IBM Plex Mono", monospace;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.article-content a.omf-native__btn:hover,
.article-content a.omf-native__btn:focus-visible {
	transform: translateY(-2px);
}

/* Первый массаж лица: тёмно-зелёный с розовой кнопкой */
.article-content .omf-native_first-massage {
	background: #30431e;
	color: #fff;
}
.article-content .omf-native_first-massage::after {
	content: "";
	position: absolute;
	right: -70px;
	top: -70px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: #d88688;
	opacity: .25;
	pointer-events: none;
}
.article-content .omf-native_first-massage .omf-native__title {
	color: #fff;
}
.article-content .omf-native_first-massage .omf-native__title,
.article-content .omf-native_first-massage .omf-native__text,
.article-content .omf-native_first-massage .omf-native__prices,
.article-content .omf-native_first-massage .omf-native__actions {
	position: relative;
	z-index: 1;
}
.article-content a.omf-native__btn_primary {
	background: #d88688;
	color: #fff;
}
.article-content a.omf-native__btn_primary:hover,
.article-content a.omf-native__btn_primary:focus-visible {
	background: #c4686b;
	color: #fff;
}
.article-content .omf-native_first-massage a.omf-native__btn_ghost {
	border-color: rgba(255, 255, 255, .7);
	color: #fff;
}
.article-content .omf-native_first-massage a.omf-native__btn_ghost:hover,
.article-content .omf-native_first-massage a.omf-native__btn_ghost:focus-visible {
	background: #fff;
	color: #30431e;
}

/* Подарочные сертификаты */
.article-content .omf-native_gift {
	background: #f6dee0;
	color: #30431e;
}
.article-content .omf-native_gift a.omf-native__btn_primary {
	background: #30431e;
	color: #fff;
}
.article-content .omf-native_gift a.omf-native__btn_primary:hover,
.article-content .omf-native_gift a.omf-native__btn_primary:focus-visible {
	background: #1f2d12;
	color: #fff;
}

/* Остались вопросы: золотой с тёмно-зелёной кнопкой */
.article-content .omf-native_consultation {
	background: #e9bb72;
	color: #30431e;
}
.article-content .omf-native_consultation::after {
	content: "";
	position: absolute;
	right: -50px;
	bottom: -80px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: #fff;
	opacity: .3;
	pointer-events: none;
}
.article-content .omf-native_consultation .omf-native__title,
.article-content .omf-native_consultation .omf-native__text,
.article-content .omf-native_consultation .omf-native__actions {
	position: relative;
	z-index: 1;
}
.article-content .omf-native_consultation a.omf-native__btn_primary {
	background: #30431e;
	color: #fff;
}
.article-content .omf-native_consultation a.omf-native__btn_primary:hover,
.article-content .omf-native_consultation a.omf-native__btn_primary:focus-visible {
	background: #1f2d12;
	color: #fff;
}
.article-content .omf-native_consultation a.omf-native__btn_ghost {
	border-color: #30431e;
	color: #30431e;
}
.article-content .omf-native_consultation a.omf-native__btn_ghost:hover,
.article-content .omf-native_consultation a.omf-native__btn_ghost:focus-visible {
	background: #30431e;
	color: #fff;
}

@media (max-width: 767px) {
	.article-content {
		font-size: 17px;
	}
	.article-content .omf-native {
		margin: 32px 0;
		padding: 26px 22px;
		border-radius: 22px;
	}
	.article-content .omf-native .omf-native__title {
		font-size: 20px;
	}
	.article-content a.omf-native__btn {
		width: 100%;
	}
}

/* Форма внутри блока «Остались вопросы?» */
.article-content .omf-native__form {
	position: relative;
	z-index: 1;
	max-width: none;
	margin: 0 0 18px;
}
.article-content .omf-native__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 12px;
}
.article-content .omf-native__input {
	flex: 1 1 200px;
	min-width: 0;
	height: 54px;
	margin: 0;
	padding: 0 24px;
	border: 2px solid transparent;
	border-radius: 999px;
	background: #fff;
	color: #30431e;
	font-family: inherit;
	font-size: 16px;
	transition: border-color .25s ease, box-shadow .25s ease;
}
.article-content .omf-native__input::placeholder {
	color: rgba(48, 67, 30, .55);
}
.article-content .omf-native__input:focus {
	outline: none;
	border-color: #30431e;
	box-shadow: 0 0 0 4px rgba(48, 67, 30, .15);
}
.article-content .omf-native__input.error {
	border-color: #b3261e;
	animation: omfShake .4s ease;
}
/* Тексты ошибок валидатора прячем: ошибку показывает красная рамка */
.article-content .omf-native__form label.error {
	display: none !important;
}
.article-content .omf-native__submit {
	flex: 0 0 auto;
	height: 54px;
	padding: 0 30px;
	border: 2px solid transparent;
	border-radius: 999px;
	background: #30431e;
	color: #fff;
	font-family: "IBM Plex Mono", monospace;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.article-content .omf-native__submit:hover,
.article-content .omf-native__submit:focus-visible {
	background: #1f2d12;
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(48, 67, 30, .28);
}
.article-content .omf-native__submit:active {
	transform: scale(.98);
	box-shadow: none;
}
.article-content .omf-native__accept {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
}
.article-content .omf-native__accept input {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: #30431e;
}
.article-content .omf-native__accept a {
	color: inherit;
}
.article-content .omf-native__links-label {
	margin: 0 0 12px;
	font-size: 14px;
	opacity: .8;
}

/* Движение */
@keyframes omfFadeUp {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}
@keyframes omfChip {
	from { opacity: 0; transform: translateY(10px) scale(.94); }
	to { opacity: 1; transform: none; }
}
@keyframes omfPulse {
	0% { box-shadow: 0 0 0 0 rgba(216, 134, 136, .65); }
	100% { box-shadow: 0 0 0 18px rgba(216, 134, 136, 0); }
}
@keyframes omfDrift {
	from { transform: translate(0, 0); }
	to { transform: translate(-16px, 12px); }
}
@keyframes omfShake {
	20% { transform: translateX(-5px); }
	45% { transform: translateX(5px); }
	70% { transform: translateX(-3px); }
	100% { transform: none; }
}

.article-head {
	animation: omfFadeUp .7s cubic-bezier(.2, .7, .2, 1) both;
}

/* Появление при прокрутке. Класс is-motion добавляет скрипт: без JS всё видно сразу */
.article-content.is-motion > [data-fx] {
	opacity: 0;
	transition: opacity .7s ease, transform .85s cubic-bezier(.2, .7, .2, 1);
}
.article-content.is-motion > [data-fx="up"] { transform: translateY(24px); }
.article-content.is-motion > [data-fx="rise"] { transform: translateY(12px); }
.article-content.is-motion > [data-fx="zoom"] { transform: scale(.96); }
.article-content.is-motion > [data-fx="left"] { transform: translateX(-34px); }
.article-content.is-motion > [data-fx="right"] { transform: translateX(34px); }
.article-content.is-motion > [data-fx].is-in {
	opacity: 1;
	transform: none;
}
/* Списки: пункты появляются по очереди */
.article-content.is-motion > [data-fx="stagger"] {
	opacity: 1;
	transform: none;
}
.article-content.is-motion > [data-fx="stagger"] > li {
	opacity: 0;
	transform: translateX(-14px);
	transition: opacity .55s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
	transition-delay: calc(var(--i, 0) * 80ms);
}
.article-content.is-motion > [data-fx="stagger"].is-in > li {
	opacity: 1;
	transform: none;
}

/* Внутри блоков: плашки цен и кнопка */
.article-content.is-motion .omf-native:not(.is-in) .omf-native__prices li {
	opacity: 0;
}
.article-content.is-motion .omf-native.is-in .omf-native__prices li {
	animation: omfChip .6s cubic-bezier(.2, .7, .2, 1) both;
}
.article-content.is-motion .omf-native.is-in .omf-native__prices li:nth-child(1) { animation-delay: .25s; }
.article-content.is-motion .omf-native.is-in .omf-native__prices li:nth-child(2) { animation-delay: .35s; }
.article-content.is-motion .omf-native.is-in .omf-native__prices li:nth-child(3) { animation-delay: .45s; }
.article-content.is-motion .omf-native_first-massage.is-in .omf-native__btn_primary {
	animation: omfPulse 1.7s ease-out 1.1s 2;
}
.article-content .omf-native::after {
	animation: omfDrift 9s ease-in-out infinite alternate;
}

/* Кнопки и интерактив */
.article-content a.omf-native__btn:hover,
.article-content a.omf-native__btn:focus-visible {
	box-shadow: 0 10px 20px rgba(48, 67, 30, .25);
}
.article-content a.omf-native__btn:active {
	transform: scale(.98);
	box-shadow: none;
}
.article-content figure {
	overflow: hidden;
	border-radius: 20px;
}
.article-content figure img {
	transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.article-content figure:hover img {
	transform: scale(1.03);
}
.article-content tbody tr td {
	transition: background-color .25s ease;
}
.article-content tbody tr:hover td {
	background: #f4ecd7;
}

@media (max-width: 767px) {
	.article-content.is-motion > [data-fx="left"],
	.article-content.is-motion > [data-fx="right"] {
		transform: translateY(24px);
	}
	.article-content .omf-native__submit {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.article-head,
	.article-content *,
	.article-content *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* Типографика: красивые переносы. Неразрывные пробелы ставит сборка статьи,
   здесь выравнивание строк: заголовки по балансу, текст без одиноких слов в конце абзаца */
.article-head__titles h3,
.article-content h3,
.article-content h4,
.article-content .omf-native__title {
	text-wrap: balance;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}
.article-content p,
.article-content li,
.article-content .omf-native__text,
.article-content .omf-native__accept {
	text-wrap: pretty;
	overflow-wrap: break-word;
	hyphens: none;
}

/* Блок знакомства с Oh My Face в конце статьи: тот же, что на главной, но ниже */
.omf-intro-compact {
	background: #fcf9f1;
}
.omf-intro-compact .hn-intro {
	padding-block: 0 clamp(40px, 6vw, 80px);
	background: #fcf9f1;
}
.omf-intro-compact .hn-intro__panel {
	min-height: 500px;
}
.omf-intro-compact .hn-intro__content {
	padding: clamp(30px, 4vw, 54px);
}
.omf-intro-compact .hn-intro__eyebrow {
	margin-bottom: 14px;
}
.omf-intro-compact .hn-intro h2 {
	margin-bottom: 14px;
	font-size: clamp(34px, 3.8vw, 52px);
}
.omf-intro-compact .hn-intro__offers {
	margin-bottom: 22px;
}
.omf-intro-compact .hn-intro__offer {
	padding: 14px 0;
}
.omf-intro-compact .hn-intro__offer p {
	font-size: 34px;
}
@media (max-width: 1000px) {
	.omf-intro-compact .hn-intro__panel {
		min-height: 470px;
	}
}
@media (max-width: 640px) {
	.omf-intro-compact .hn-intro__panel {
		min-height: 600px;
	}
	.omf-intro-compact .hn-intro__content {
		padding: 100px 22px 40px;
	}
	.omf-intro-compact .hn-intro h2 {
		font-size: 36px;
	}
	.omf-intro-compact .hn-intro__offer p {
		font-size: 30px;
	}
}
.omf-intro-compact.is-motion-item {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}
.omf-intro-compact.is-motion-item.is-in {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.omf-intro-compact.is-motion-item {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Иллюстрация сбоку от текста: справа, на мобильном во всю ширину */
.article-content figure.omf-figure_side {
	float: right;
	width: min(36%, 300px);
	margin: 6px 0 20px 36px;
}
.article-content figure.omf-figure_side img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
}
/* Новый раздел начинается под плавающей картинкой */
.article-content h3 {
	clear: both;
}
@media (max-width: 767px) {
	.article-content figure.omf-figure_side {
		float: none;
		width: 100%;
		margin: 0 0 24px;
	}
}
