/* ==========================================================================
   Сайт подросткового психолога. Стили публичной части.

   Правки внешнего вида безопаснее всего делать через переменные в блоке
   :root ниже — они управляют цветами, отступами и скруглениями сразу везде.
   ========================================================================== */

:root {
	--font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

	--ink: #1f1f1f;
	--ink-soft: #4a4a4a;
	--muted: #7c7873;
	--bg: #ffffff;
	--bg-grey: #efedeb;
	--line: #e3dfda;
	--accent: #b3927a;
	--accent-soft: #e4cdb8;

	--container: 1160px;
	--container-narrow: 780px;
	--gutter: 24px;
	--radius: 8px;
	--radius-lg: 16px;

	--section-y: clamp(64px, 8vw, 120px);
	--header-h: 72px;
}

/* --- Базовое --- */

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

html {
	scroll-behavior: smooth;
	/* Якорные ссылки не должны прятать заголовок под липкой шапкой. */
	scroll-padding-top: calc(var(--header-h) + 16px);
	-webkit-text-size-adjust: 100%;
}

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

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

a {
	color: inherit;
}

h1, h2, h3, h4 {
	margin: 0;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

p {
	margin: 0;
}

ul, ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--ink);
	color: #fff;
	text-decoration: none;
}

.skip-link:focus {
	left: 8px;
	top: 8px;
}

/* --- Сетка --- */

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.container--narrow {
	max-width: var(--container-narrow);
}

.section {
	padding: var(--section-y) 0;
}

.section--tight {
	padding: clamp(40px, 5vw, 72px) 0;
}

.section--grey {
	background: var(--bg-grey);
}

.section--page {
	padding-top: clamp(48px, 6vw, 90px);
}

.section__head {
	max-width: 720px;
	margin: 0 auto clamp(40px, 5vw, 72px);
	text-align: center;
}

.section__title {
	font-size: clamp(27px, 3.4vw, 38px);
}

.section__title--left {
	text-align: left;
}

.section__subtitle {
	margin-top: 18px;
	color: var(--ink-soft);
	font-size: clamp(16px, 1.6vw, 19px);
	line-height: 1.55;
}

.section__subtitle--left {
	text-align: left;
}

.section__lead-title {
	max-width: 720px;
	margin: 0 auto clamp(36px, 4vw, 56px);
	font-size: clamp(21px, 2.4vw, 27px);
	line-height: 1.35;
	text-align: center;
}

/* --- Шапка --- */

.header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header.is-scrolled {
	border-bottom-color: var(--line);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: var(--header-h);
}

.header__logo {
	flex: 0 0 auto;
	font-size: 18px;
	font-weight: 500;
	letter-spacing: -0.01em;
	text-decoration: none;
	white-space: nowrap;
}

.nav {
	display: flex;
	align-items: center;
	gap: 28px;
	margin-left: auto;
}

.nav__list {
	display: flex;
	align-items: center;
	gap: 26px;
}

.nav__link {
	color: var(--ink-soft);
	font-size: 15px;
	text-decoration: none;
	transition: color 0.15s ease;
}

.nav__link:hover,
.nav__link.is-active {
	color: var(--ink);
}

.burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	margin-left: auto;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.burger span {
	display: block;
	width: 22px;
	height: 1.5px;
	margin: 0 auto;
	background: var(--ink);
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger[aria-expanded='true'] span:nth-child(1) {
	transform: translateY(6.5px) rotate(45deg);
}

.burger[aria-expanded='true'] span:nth-child(2) {
	opacity: 0;
}

.burger[aria-expanded='true'] span:nth-child(3) {
	transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Кнопки --- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 12px 30px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn:active {
	transform: translateY(1px);
}

.btn--dark {
	background: var(--ink);
	color: #fff;
}

.btn--dark:hover {
	background: #383838;
}

.btn--outline {
	background: transparent;
	border-color: var(--ink);
	color: var(--ink);
}

.btn--outline:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.btn--sm {
	min-height: 42px;
	padding: 8px 20px;
	font-size: 15px;
}

.btn--full {
	width: 100%;
}

.btn[disabled] {
	opacity: 0.55;
	cursor: progress;
}

/* --- Первый экран --- */

.hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	min-height: calc(100svh - var(--header-h));
}

.hero__text {
	display: flex;
	align-items: center;
	padding: clamp(48px, 6vw, 90px) var(--gutter);
}

.hero__text-inner {
	max-width: 520px;
	margin-left: auto;
	padding-right: clamp(16px, 4vw, 60px);
}

.hero__title {
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.18;
}

.hero__lead {
	margin-top: 28px;
	color: var(--ink-soft);
	font-size: clamp(16px, 1.7vw, 19px);
	line-height: 1.55;
}

.hero__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 40px;
}

.hero__media {
	position: relative;
	overflow: hidden;
	background: var(--bg-grey);
}

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

/* --- Карточки --- */

.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(20px, 2.6vw, 34px);
}

.card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 32px 28px;
	background: var(--bg-grey);
	border-radius: var(--radius-lg);
}

.section--grey .card {
	background: var(--bg);
}

.cards--flat .card {
	background: transparent;
	padding: 0;
}

.section--grey .cards--flat .card {
	background: transparent;
}

.card--row {
	flex-direction: row;
	gap: 18px;
	align-items: flex-start;
}

.card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 22px;
	background: #fff;
	border-radius: 50%;
	color: var(--accent);
}

.section--grey .card__icon {
	background: var(--bg-grey);
}

.card__icon--sm {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	margin-bottom: 0;
}

.icon {
	width: 24px;
	height: 24px;
}

.icon--tiny {
	width: 17px;
	height: 17px;
}

.card__title {
	font-size: 19px;
}

.card__text {
	margin-top: 10px;
	color: var(--ink-soft);
	font-size: 16px;
	line-height: 1.55;
}

/* --- Две колонки --- */

.split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(32px, 5vw, 72px);
}

.split__title {
	margin-bottom: 20px;
	font-size: clamp(21px, 2.2vw, 25px);
}

.split__text {
	color: var(--ink-soft);
	line-height: 1.6;
}

.split__text + .split__text {
	margin-top: 14px;
}

.split__text--lead {
	margin-top: 18px;
	color: var(--ink);
}

.split__list {
	margin-top: 16px;
	display: grid;
	gap: 10px;
}

.split__list li {
	position: relative;
	padding-left: 22px;
	color: var(--ink-soft);
	line-height: 1.5;
}

.split__list li::before {
	content: '';
	position: absolute;
	top: 11px;
	left: 0;
	width: 8px;
	height: 8px;
	background: var(--accent-soft);
	border-radius: 50%;
}

/* --- Ряд кнопок --- */

.cta-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

/* --- Шаги --- */

.steps {
	display: grid;
	gap: 34px;
}

.steps__item {
	display: flex;
	gap: 22px;
	align-items: flex-start;
}

.steps__num {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--accent-soft);
	border-radius: 50%;
	color: var(--accent);
	font-size: 17px;
}

.steps__title {
	font-size: 19px;
}

.steps__text {
	margin-top: 8px;
	color: var(--ink-soft);
	line-height: 1.55;
}

/* --- Фраза-акцент --- */

.quote {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 34px;
	text-align: center;
}

.quote__rule {
	width: 110px;
	height: 1px;
	background: var(--line);
}

.quote__text {
	max-width: 720px;
	font-size: clamp(21px, 2.6vw, 29px);
	line-height: 1.35;
}

/* --- Обо мне --- */

.about {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(32px, 5vw, 80px);
	align-items: center;
}

.about__paragraph {
	margin-top: 22px;
	color: var(--ink-soft);
	font-size: clamp(16px, 1.6vw, 18px);
	line-height: 1.6;
}

.about__media img {
	width: 100%;
	border-radius: var(--radius-lg);
}

/* --- Раскрывающиеся блоки --- */

.accordion {
	display: grid;
	gap: 2px;
}

.accordion__item {
	background: var(--bg);
	border-radius: var(--radius);
	overflow: hidden;
}

.section--grey .accordion__item {
	background: var(--bg);
}

.accordion__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 24px 26px;
	cursor: pointer;
	list-style: none;
	font-size: 18px;
	font-weight: 500;
}

.accordion__head::-webkit-details-marker {
	display: none;
}

.accordion__sign {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	transition: transform 0.25s ease;
}

.accordion__sign::before,
.accordion__sign::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	background: var(--ink);
	transform: translate(-50%, -50%);
}

.accordion__sign::before {
	width: 16px;
	height: 1.5px;
}

.accordion__sign::after {
	width: 1.5px;
	height: 16px;
	transition: opacity 0.2s ease;
}

.accordion__item[open] .accordion__sign {
	transform: rotate(180deg);
}

.accordion__item[open] .accordion__sign::after {
	opacity: 0;
}

.accordion__body {
	padding: 0 26px 26px;
	color: var(--ink-soft);
	line-height: 1.6;
}

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

/* --- Галерея --- */

.gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(10px, 1.4vw, 18px);
}

.gallery__item img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius);
}

/* --- Принципы --- */

.principles {
	display: grid;
	gap: clamp(28px, 4vw, 52px);
}

.principles__item {
	position: relative;
	max-width: 460px;
	padding-top: 46px;
}

.principles__item--right {
	margin-left: auto;
}

.principles__num {
	position: absolute;
	top: -18px;
	left: -6px;
	color: var(--bg-grey);
	font-size: clamp(72px, 9vw, 116px);
	font-weight: 600;
	line-height: 1;
	user-select: none;
}

.section--grey .principles__num {
	color: #e2ded9;
}

.principles__title,
.principles__text {
	position: relative;
}

.principles__title {
	font-size: clamp(20px, 2.2vw, 24px);
}

.principles__text {
	margin-top: 10px;
	color: var(--ink-soft);
	line-height: 1.55;
}

/* --- Результаты --- */

.results {
	display: grid;
	gap: 30px;
}

.results__item {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

.results__check {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--bg);
	border-radius: 50%;
	color: var(--accent);
}

.results__title {
	font-size: 19px;
}

.results__text {
	margin-top: 6px;
	color: var(--ink-soft);
	line-height: 1.55;
}

/* --- Стоимость --- */

.plans {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(18px, 2.4vw, 28px);
	align-items: start;
}

.plan {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 34px 30px;
	background: var(--bg-grey);
	border: 1px solid transparent;
	border-radius: var(--radius-lg);
}

.plan--featured {
	background: var(--bg);
	border-color: var(--ink);
}

.plan__title {
	font-size: 19px;
}

.plan__price {
	margin-top: 18px;
	font-size: clamp(28px, 3vw, 34px);
	font-weight: 500;
	letter-spacing: -0.02em;
}

.plan__duration {
	margin-top: 4px;
	color: var(--muted);
	font-size: 15px;
}

.plan__text {
	margin-top: 16px;
	color: var(--ink-soft);
	font-size: 16px;
	line-height: 1.55;
}

.plan__features {
	display: grid;
	gap: 10px;
	margin: 22px 0 28px;
}

.plan__features li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	color: var(--ink-soft);
	font-size: 15px;
	line-height: 1.45;
}

.plan__features .icon {
	flex: 0 0 auto;
	margin-top: 3px;
	color: var(--accent);
}

.plan .btn {
	margin-top: auto;
}

.plans__note {
	max-width: 720px;
	margin: clamp(28px, 3vw, 44px) auto 0;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.55;
	text-align: center;
}

/* --- Контакты и форма --- */

.contact {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: clamp(32px, 4vw, 64px);
	align-items: start;
}

.form {
	display: grid;
	gap: 20px;
	padding: clamp(26px, 3vw, 38px);
	background: var(--bg-grey);
	border-radius: var(--radius-lg);
}

/* Поле-ловушка для ботов: убрано с экрана, но не через display:none,
   иначе часть автоматики его игнорирует. */
.form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form__row {
	display: grid;
	gap: 8px;
}

.form__label {
	font-size: 15px;
	font-weight: 500;
}

.form__required {
	margin-left: 3px;
	color: var(--accent);
}

.form__input {
	width: 100%;
	padding: 14px 16px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	transition: border-color 0.15s ease;
}

.form__input:focus {
	border-color: var(--accent);
	outline: none;
}

.form__input--area {
	resize: vertical;
	min-height: 110px;
}

.form__hint {
	color: var(--muted);
	font-size: 14px;
}

.form__choices {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.choice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 100px;
	font-size: 15px;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.choice:has(input:checked) {
	border-color: var(--ink);
}

.choice input {
	accent-color: var(--ink);
}

.form__consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	color: var(--ink-soft);
	font-size: 14px;
	line-height: 1.45;
	cursor: pointer;
}

.form__consent input {
	margin-top: 3px;
	accent-color: var(--ink);
}

.form__status {
	display: none;
	margin: 0;
	padding: 14px 16px;
	border-radius: var(--radius);
	font-size: 15px;
	line-height: 1.45;
}

.form__status.is-visible {
	display: block;
}

.form__status--ok {
	background: #e7f0e8;
	color: #2f5d3a;
}

.form__status--error {
	background: #f7e6e3;
	color: #8a3324;
}

.contact__side-title {
	margin-bottom: 20px;
	font-size: 18px;
}

.contact__list {
	display: grid;
	gap: 10px;
}

.contact__link {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 14px 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.contact__link:hover {
	border-color: var(--ink);
	background: var(--bg-grey);
}

.contact__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--bg-grey);
	border-radius: 50%;
	color: var(--accent);
}

.contact__link:hover .contact__icon {
	background: var(--bg);
}

.contact__link strong {
	display: block;
	font-size: 16px;
	font-weight: 500;
}

.contact__link em {
	display: block;
	color: var(--muted);
	font-size: 14px;
	font-style: normal;
}

/* --- Текстовые страницы --- */

.prose p {
	margin-top: 18px;
	color: var(--ink-soft);
	line-height: 1.65;
}

.prose__back {
	margin-top: 40px;
}

.notfound__code {
	color: var(--accent-soft);
	font-size: clamp(64px, 10vw, 110px);
	font-weight: 600;
	line-height: 1;
}

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

/* --- Подвал --- */

.footer {
	padding: clamp(48px, 6vw, 80px) 0 40px;
	background: var(--bg-grey);
}

.footer__inner {
	display: grid;
	gap: 26px;
}

.footer__brand {
	font-size: 19px;
	font-weight: 500;
}

.footer__contacts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 26px;
}

.footer__contacts a {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	color: var(--ink-soft);
	font-size: 15px;
	text-decoration: none;
	transition: color 0.15s ease;
}

.footer__contacts a:hover {
	color: var(--ink);
}

.footer__icon {
	width: 19px;
	height: 19px;
	color: var(--accent);
}

.footer__note {
	max-width: 640px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.55;
}

.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	padding-top: 22px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 14px;
}

.footer__bottom a {
	color: var(--muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.footer__bottom a:hover {
	color: var(--ink);
}

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 1000px) {
	.cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.plans {
		grid-template-columns: 1fr;
		max-width: 520px;
		margin: 0 auto;
	}

	.contact {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 860px) {
	.burger {
		display: flex;
	}

	.nav {
		position: fixed;
		top: var(--header-h);
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 99;
		flex-direction: column;
		justify-content: flex-start;
		gap: 0;
		margin: 0;
		padding: 32px var(--gutter) 48px;
		background: var(--bg);
		overflow-y: auto;
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	}

	.nav.is-open {
		transform: translateY(0);
		opacity: 1;
		visibility: visible;
	}

	.nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
	}

	.nav__list li + li {
		border-top: 1px solid var(--line);
	}

	.nav__link {
		display: block;
		padding: 16px 0;
		font-size: 18px;
	}

	.nav__cta {
		width: 100%;
		margin-top: 28px;
	}

	body.is-menu-open {
		overflow: hidden;
	}

	.hero {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.hero__text {
		padding: clamp(40px, 8vw, 64px) var(--gutter);
	}

	.hero__text-inner {
		max-width: 640px;
		margin: 0 auto;
		padding-right: 0;
	}

	.hero__media {
		order: -1;
		aspect-ratio: 4 / 3;
	}

	.split {
		grid-template-columns: 1fr;
	}

	.about {
		grid-template-columns: 1fr;
	}

	.about__media {
		order: -1;
		max-width: 460px;
	}

	.gallery {
		grid-template-columns: repeat(2, 1fr);
	}

	.principles__item {
		max-width: none;
		margin-left: 0;
	}
}

@media (max-width: 560px) {
	body {
		font-size: 16px;
	}

	.cards {
		grid-template-columns: 1fr;
	}

	.card {
		padding: 26px 22px;
	}

	.hero__buttons .btn,
	.cta-row .btn {
		width: 100%;
	}

	.accordion__head {
		padding: 20px;
		font-size: 17px;
	}

	.accordion__body {
		padding: 0 20px 20px;
	}
}

/* --- Уважение к системным настройкам --- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

@media print {
	.header,
	.footer,
	.form,
	.burger {
		display: none;
	}
}
