/*
Theme Name: Marta Landing
Description: Одностраничный лендинг специалиста (Марта). Ручная минимальная тема: index.php — лендинг, page-success.php — страница «спасибо». Форма — WPForms (шорткод), шрифт Lora — self-hosted.
Version: 1.2
Requires at least: 6.4
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marta-landing

Changelog
1.0 — первая версия: hero, форма, about + problem-cards, trust-list, closing, sticky-CTA (мобильный), scroll-reveal, page-success. Фиолетовая палитра.
1.1 — подключена форма WPForms id=9 ($wpforms_id в index.php).
1.2 — фавикон: буква «М» на аметистовом фоне (assets/icons: svg + png 32/180/192/270/512), подключён через фильтр get_site_icon_url.
*/

/* ------------------------------------------------------------------
   Шрифт: Lora (variable, 400–700), self-hosted, SIL OFL 1.1 — см. fonts/OFL.txt
   ------------------------------------------------------------------ */
@font-face {
	font-family: "Lora";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("fonts/lora-cyrillic-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
	font-family: "Lora";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("fonts/lora-cyrillic-wght-normal.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Lora";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("fonts/lora-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Lora";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("fonts/lora-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Lora";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("fonts/lora-cyrillic-wght-italic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Lora";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("fonts/lora-latin-wght-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------
   Токены
   ------------------------------------------------------------------ */
:root {
	/* светлая часть страницы */
	--color-bg: #f6f1fa;            /* лавандовая бумага */
	--color-surface: #ffffff;
	--color-text: #2a1e35;          /* сливовые чернила */
	--color-muted: #665873;
	--color-border: #e3d8ee;
	--color-tint: #ece2f6;
	--color-primary: #6d42a6;       /* аметист — текст, иконки, фокус */

	/* кнопка */
	--color-cta: #8052c2;
	--color-cta-hover: #6c40ae;

	/* тёмная часть: hero, closing, footer */
	--color-night: #1c1228;
	--color-night-2: #2b1a40;
	--color-on-night: #f3ecf9;
	--color-on-night-muted: #c6b7d6;
	--color-candle: #e2b46c;        /* свет свечей с фото — только акценты на тёмном */

	--radius: 14px;
	--radius-lg: 20px;
	--container-w: 640px;
	--hero-w: 1080px;
	--gutter: 20px;
	--shadow-card: 0 6px 16px rgba(58, 32, 96, .06);
	--shadow-raised: 0 22px 48px rgba(40, 20, 70, .16);

	--font: "Lora", Georgia, "Times New Roman", serif;
}

/* ------------------------------------------------------------------
   База
   ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3, p, ul, blockquote, figure { margin: 0; }

h1, h2, h3 {
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -.01em;
	text-wrap: balance;
}

h2 { font-size: clamp(25px, 6.4vw, 32px); }
h3 { font-size: clamp(20px, 5.2vw, 23px); line-height: 1.28; }

p { text-wrap: pretty; }

a { color: var(--color-primary); }

:focus-visible {
	outline: 3px solid var(--color-primary);
	outline-offset: 3px;
	border-radius: 4px;
}

.container {
	width: 100%;
	max-width: calc(var(--container-w) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section { padding-block: 56px; }

main h2 { margin-bottom: 18px; }

.prose p + p { margin-top: 14px; }

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ------------------------------------------------------------------
   Кнопка
   ------------------------------------------------------------------ */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 14px 30px;
	border: 0;
	border-radius: 999px;
	background: var(--color-cta);
	color: #fff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 12px 28px rgba(109, 66, 166, .36), inset 0 1px 0 rgba(255, 255, 255, .22);
	transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn:hover { background: var(--color-cta-hover); }
.btn:active { transform: translateY(1px); box-shadow: 0 6px 16px rgba(109, 66, 166, .34); }

.hero .btn:focus-visible,
.closing .btn:focus-visible,
.sticky-cta .btn:focus-visible { outline-color: var(--color-candle); }

/* ------------------------------------------------------------------
   1. Hero
   ------------------------------------------------------------------ */
.hero {
	position: relative;
	background:
		radial-gradient(90% 55% at 78% 8%, rgba(128, 82, 194, .34) 0%, rgba(128, 82, 194, 0) 70%),
		var(--color-night);
	color: var(--color-on-night);
	overflow: hidden;
}

.hero__inner {
	max-width: calc(var(--hero-w) + var(--gutter) * 2);
	margin-inline: auto;
}

.hero__media {
	position: relative;
	aspect-ratio: 4 / 5;
	max-height: 64svh;
	width: 100%;
	overflow: hidden;
}

.hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 0%;
}

/* фото растворяется в фоне — текст ложится на затемнение */
.hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(28, 18, 40, 0) 42%, rgba(28, 18, 40, .78) 76%, var(--color-night) 100%);
	pointer-events: none;
}

.hero__text {
	position: relative;
	margin-top: -104px;
	padding: 0 var(--gutter) 84px;
}

.hero__name {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	color: var(--color-candle);
	font-size: 18px;
	font-style: italic;
	font-weight: 500;
	line-height: 1.3;
}

.hero__name::before {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	background: currentColor;
	transform: rotate(45deg);
}

.hero h1 {
	font-size: clamp(31px, 8.4vw, 52px);
	line-height: 1.1;
	letter-spacing: -.015em;
}

.hero__sub {
	margin-top: 16px;
	max-width: 34em;
	color: var(--color-on-night-muted);
	font-size: 18px;
	line-height: 1.55;
}

.hero .btn {
	width: 100%;
	margin-top: 26px;
}

/* ------------------------------------------------------------------
   2. Форма / CTA
   ------------------------------------------------------------------ */
.consultation {
	padding-block: 0 56px;
	scroll-margin-top: 16px;
}

.form-card {
	position: relative;
	margin-top: -44px;               /* карточка заходит на hero */
	padding: 26px 20px 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-raised);
}

.form-card h2 { margin-bottom: 8px; }

.form-card .lede {
	margin-bottom: 20px;
	color: var(--color-muted);
}

.admin-note {
	padding: 12px 14px;
	border: 1px dashed #b3261e;
	border-radius: 10px;
	color: #8c1d18;
	font-size: 15px;
	line-height: 1.45;
}

/* --- WPForms: приводим к палитре темы -------------------------------
   Переменные — для modern-разметки WPForms; прямые правила ниже —
   чтобы результат не зависел от режима разметки формы. */
#consultation .wpforms-container {
	margin: 0;
	--wpforms-field-border-radius: 10px;
	--wpforms-field-border-color: var(--color-border);
	--wpforms-field-background-color: #fff;
	--wpforms-field-text-color: var(--color-text);
	--wpforms-field-size-input-height: 52px;
	--wpforms-field-size-font-size: 17px;
	--wpforms-label-color: var(--color-text);
	--wpforms-label-sublabel-color: var(--color-muted);
	--wpforms-label-size-font-size: 16px;
	--wpforms-button-border-radius: 999px;
	--wpforms-button-background-color: var(--color-cta);
	--wpforms-button-border-color: var(--color-cta);
	--wpforms-button-text-color: #fff;
	--wpforms-button-size-height: 56px;
	--wpforms-button-size-font-size: 18px;
}

#consultation .wpforms-form,
#consultation .wpforms-form input,
#consultation .wpforms-form select,
#consultation .wpforms-form textarea,
#consultation .wpforms-form button {
	font-family: var(--font);
}

#consultation .wpforms-form .wpforms-field { padding: 0 0 16px; }

#consultation .wpforms-form .wpforms-field-label {
	display: block;
	margin: 0 0 6px;
	color: var(--color-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
}

#consultation .wpforms-form .wpforms-required-label { color: var(--color-primary); }

#consultation .wpforms-form input[type="text"],
#consultation .wpforms-form input[type="tel"],
#consultation .wpforms-form input[type="email"],
#consultation .wpforms-form input[type="number"],
#consultation .wpforms-form select,
#consultation .wpforms-form textarea {
	width: 100%;
	max-width: 100%;
	min-height: 52px;
	padding: 12px 14px;
	border: 1px solid #cdbfdd;
	border-radius: 10px;
	background-color: #fff;
	color: var(--color-text);
	font-size: 17px;
	line-height: 1.4;
	box-shadow: none;
}

#consultation .wpforms-form textarea {
	min-height: 112px;
	resize: vertical;
}

#consultation .wpforms-form input:focus,
#consultation .wpforms-form select:focus,
#consultation .wpforms-form textarea:focus {
	border-color: var(--color-primary);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(109, 66, 166, .22);
}

#consultation .wpforms-form .wpforms-field-description,
#consultation .wpforms-form .wpforms-field-sublabel {
	color: var(--color-muted);
	font-size: 14px;
	line-height: 1.45;
}

#consultation .wpforms-form .wpforms-submit-container { padding: 6px 0 0; }

#consultation .wpforms-form button[type="submit"].wpforms-submit {
	width: 100%;
	min-height: 56px;
	height: auto;
	padding: 14px 30px;
	border: 0;
	border-radius: 999px;
	background: var(--color-cta);
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 12px 28px rgba(109, 66, 166, .36), inset 0 1px 0 rgba(255, 255, 255, .22);
	transition: background-color .18s ease;
}

#consultation .wpforms-form button[type="submit"].wpforms-submit:hover { background: var(--color-cta-hover); }

#consultation .wpforms-form button[type="submit"].wpforms-submit:focus-visible {
	outline: 3px solid var(--color-primary);
	outline-offset: 3px;
}

/* ------------------------------------------------------------------
   3. About + problem-cards
   ------------------------------------------------------------------ */
.about { padding-block: 8px 56px; }

.about h3 { margin: 40px 0 16px; }

.problem-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.problem-cards li {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 16px 16px 18px;
	box-shadow: var(--shadow-card);
}

.problem-cards strong {
	display: block;
	margin-bottom: 4px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}

.problem-cards span {
	display: block;
	color: var(--color-muted);
	font-size: 16px;
	line-height: 1.5;
}

/* ------------------------------------------------------------------
   4. Trust-list
   ------------------------------------------------------------------ */
.trust {
	background: var(--color-tint);
	border-block: 1px solid var(--color-border);
}

.trust-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.trust-list li {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 14px;
	align-items: start;
	padding-block: 16px;
	border-top: 1px solid rgba(109, 66, 166, .16);
}

.trust-list li:first-child { border-top: 0; padding-top: 4px; }
.trust-list li:last-child { padding-bottom: 0; }

.trust-list svg {
	width: 28px;
	height: 28px;
	margin-top: 1px;
	padding: 6px;
	border-radius: 50%;
	background: var(--color-primary);
	color: #fff;
}

.trust-list strong { font-weight: 600; }

/* ------------------------------------------------------------------
   5. Closing
   ------------------------------------------------------------------ */
.closing {
	background:
		radial-gradient(80% 60% at 20% 0%, rgba(128, 82, 194, .28) 0%, rgba(128, 82, 194, 0) 70%),
		var(--color-night);
	color: var(--color-on-night);
	padding-block: 64px 56px;
}

.closing blockquote {
	position: relative;
	padding-left: 22px;
	border-left: 2px solid var(--color-candle);
	font-size: clamp(22px, 5.8vw, 28px);
	font-style: italic;
	font-weight: 500;
	line-height: 1.38;
	text-wrap: balance;
}

.closing__note {
	margin-top: 28px;
	color: var(--color-on-night-muted);
}

.closing .btn {
	width: 100%;
	margin-top: 26px;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer {
	background: var(--color-night);
	color: var(--color-on-night-muted);
	padding-block: 0 calc(36px + env(safe-area-inset-bottom));
	font-size: 14px;
	line-height: 1.55;
}

.site-footer .container {
	padding-top: 22px;
	border-top: 1px solid rgba(243, 236, 249, .14);
}

.site-footer p + p { margin-top: 8px; }

.site-footer a { color: var(--color-on-night); text-underline-offset: 3px; }
.site-footer a:focus-visible { outline-color: var(--color-candle); }

/* ------------------------------------------------------------------
   6. Sticky-CTA (только мобильный; включается скриптом после hero)
   ------------------------------------------------------------------ */
.sticky-cta {
	position: fixed;
	z-index: 20;
	inset: auto 0 0 0;
	padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
	background: linear-gradient(180deg, rgba(28, 18, 40, 0) 0%, rgba(28, 18, 40, .9) 46%);
	visibility: hidden;
	opacity: 0;
	transform: translateY(100%);
	transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}

.sticky-cta.is-visible {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition: opacity .25s ease, transform .25s ease, visibility 0s;
}

.sticky-cta .btn { width: 100%; }

/* ------------------------------------------------------------------
   7. Scroll-reveal. Без класса .js (скрипт не выполнился) всё видно сразу.
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
	.js [data-reveal] {
		opacity: 0;
		transform: translateY(14px);
		transition: opacity .6s ease, transform .6s ease;
	}

	.js [data-reveal].is-visible {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.btn,
	.sticky-cta { transition: none; }
}

/* ------------------------------------------------------------------
   Страница «спасибо»
   ------------------------------------------------------------------ */
.success-page {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding-block: 40px;
	background:
		radial-gradient(90% 55% at 50% 0%, rgba(128, 82, 194, .34) 0%, rgba(128, 82, 194, 0) 70%),
		var(--color-night);
}

.success-card {
	padding: 28px 20px 26px;
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}

.success-card__photo {
	width: 88px;
	height: 88px;
	margin-bottom: 20px;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--color-candle);
}

/* кадрируем общий план до лица: фото шире кружка и сдвинуто так, чтобы лицо было по центру */
.success-card__photo img {
	width: 210%;
	max-width: none;
	margin: -16% 0 0 -55%;
}

.success-card h1 {
	font-size: clamp(27px, 7vw, 34px);
	margin-bottom: 10px;
}

.success-card .lede { color: var(--color-muted); }

.success-list {
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
}

.success-list li {
	position: relative;
	padding: 14px 0 14px 22px;
	border-top: 1px solid var(--color-border);
}

.success-list li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 25px;
	width: 7px;
	height: 7px;
	background: var(--color-primary);
	transform: rotate(45deg);
}

.success-card__back {
	display: inline-block;
	margin-top: 10px;
	font-weight: 600;
	text-underline-offset: 3px;
}

/* ------------------------------------------------------------------
   Десктоп
   ------------------------------------------------------------------ */
@media (min-width: 900px) {
	body { font-size: 18px; }

	.section { padding-block: 72px; }

	/* hero: текст слева, фото в арке справа */
	.hero__inner {
		display: grid;
		grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
		align-items: center;
		gap: 72px;
		padding: 72px var(--gutter) 128px;
	}

	.hero__text {
		order: -1;
		margin-top: 0;
		padding: 0;
	}

	.hero__media {
		justify-self: end;
		width: min(100%, 430px);
		max-height: none;
		aspect-ratio: 3 / 4;
		overflow: visible;
		/* радиус арки задан в px: при 999px браузер пропорционально ужимает и нижние углы */
		border-radius: 215px 215px var(--radius-lg) var(--radius-lg);
	}

	.hero__media img { border-radius: inherit; }

	/* тонкий «свечной» контур вокруг арки */
	.hero__media::before {
		content: "";
		position: absolute;
		inset: -12px;
		border: 1px solid rgba(226, 180, 108, .55);
		border-radius: 227px 227px calc(var(--radius-lg) + 10px) calc(var(--radius-lg) + 10px);
		pointer-events: none;
	}

	.hero__media::after {
		border-radius: inherit;
		background: linear-gradient(180deg, rgba(28, 18, 40, 0) 62%, rgba(28, 18, 40, .55) 100%);
	}

	.hero__name { font-size: 20px; margin-bottom: 16px; }
	.hero__sub { font-size: 20px; margin-top: 20px; }

	.hero .btn,
	.closing .btn { width: auto; }

	.hero .btn { margin-top: 32px; }

	.consultation { padding-bottom: 72px; }

	.form-card {
		margin-top: -72px;
		padding: 36px 36px 34px;
	}

	.about { padding-block: 8px 72px; }

	/* 2×2 — только десктоп; больше двух колонок контейнер 640px не вмещает */
	.problem-cards { grid-template-columns: 1fr 1fr; }

	.closing { padding-block: 88px 72px; }

	.site-footer { padding-bottom: 40px; }

	.sticky-cta { display: none; }

	.success-card { padding: 40px 40px 34px; }
}
