/* ==========================================================================
   drdavid — стили темы
   Порядок: шрифт → цвета и размеры → основа → кнопки → логотип и языки →
            шапка → меню → первый экран → панель записи → компьютер
   ========================================================================== */

/* ---------- Шрифт Jost (локально, один файл на все начертания 300–500) ---------- */
@font-face {
	font-family: "Jost";
	src: url("../fonts/jost.woff2") format("woff2");
	font-weight: 300 500;
	font-style: normal;
	font-display: swap;
}
/* В Jost нет казахских букв (Ә, Ғ, Қ, Ң, Ө, Ұ, Ү, Һ, І).
   Только для них подставляется близкий по рисунку шрифт, подогнанный по высоте строчных. */
@font-face {
	font-family: "Jost KZ";
	src: url("../fonts/jost-kz.woff2") format("woff2");
	font-weight: 300 500;
	font-style: normal;
	font-display: swap;
	size-adjust: 90%;
	unicode-range: U+0406, U+0456, U+0492-0493, U+049A-049B, U+04A2-04A3, U+04AE-04B1, U+04BA-04BB, U+04D8-04D9, U+04E8-04E9;
}

/* ---------- Фирменные цвета и размеры ---------- */
:root {
	--c-bg: #FFFFFF;       /* фон */
	--c-bg-2: #F6F7F8;     /* второй фон секций, карточки */
	--c-tone: #E6ECEF;     /* тон: видео, цитата, карта */
	--c-chip: #EEF1F3;     /* фон кнопок-«таблеток» в белой шапке и меню */
	--c-text: #1F2226;     /* текст, графит */
	--c-text-2: #5E666C;   /* вторичный текст */
	--c-line: #E6E9EB;     /* линии */
	--c-border: #D5DADE;   /* рамки полей и «таблеток» */
	--c-accent: #5F8196;   /* дуга логотипа */

	--font: "Jost", "Jost KZ", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--pad: 20px;           /* боковой отступ на телефоне */
	--header-h: 72px;
	--ease-out: cubic-bezier(.2, .8, .2, 1);
	--max-w: 1680px;       /* максимальная ширина контента на больших мониторах */
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--c-text);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Пока подставляется выбранный язык — страницу не показываем (доли секунды) */
.i18n-wait body { visibility: hidden; }

a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
p, h1, h2, h3 { margin: 0; }

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

.muted { color: var(--c-text-2); }

.skip-link {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 100;
	padding: 12px 20px;
	background: var(--c-text);
	color: #fff;
	border-radius: 24px;
}
.skip-link:focus { top: 12px; }

/* Маленькая подпись капсом над заголовками */
.eyebrow {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--c-text-2);
}

/* ---------- Кнопки ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 56px;
	padding: 0 28px;
	border: 1px solid transparent;
	border-radius: 999px;          /* «таблетка»: радиус = половина высоты */
	font-size: 16px;
	letter-spacing: .02em;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}
.btn--primary { background: var(--c-text); color: #fff; }
.btn--line    { background: transparent; border-color: var(--c-text); color: var(--c-text); }
.btn--round   { width: 56px; padding: 0; flex-shrink: 0; }
.btn--sm      { height: 48px; padding: 0 26px; font-size: 15px; }

@media (hover: hover) {
	a:hover { color: #000; }
	.btn--primary:hover { background: #000; color: #fff; }
	.btn--line:hover { background: var(--c-bg-2); color: var(--c-text); }
}

/* «Таблетки» направлений */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
	position: relative;
	height: 40px;
	padding: 0 16px;
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--c-border);
	border-radius: 20px;
	font-size: 15px;
	transition: border-color .2s;
}
.pill::after { content: ""; position: absolute; inset: -3px -1px; } /* область нажатия 46px */
@media (hover: hover) { .pill:hover { border-color: var(--c-text); } }

/* ---------- Логотип ---------- */
.logo {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--c-text);
}
.logo__word {
	font-size: 22px;
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1;
	padding-bottom: 9px;           /* место под дугу */
}
.logo__david { position: relative; font-weight: 500; }
.logo__arc {
	position: absolute;
	left: 0;
	top: calc(100% + 1px);
	width: 82%;
	height: .36em;
	overflow: visible;
	fill: none;
	stroke: var(--c-accent);
	stroke-width: 1.5;
	stroke-linecap: round;
}
.logo__arc path { vector-effect: non-scaling-stroke; }

/* ---------- Переключатель языков ---------- */
.lang {
	height: 44px;
	padding: 0 4px;
	display: inline-flex;
	align-items: center;
	background: #fff;
	border-radius: 22px;
}
.lang--tinted { background: var(--c-chip); }
.lang__btn {
	width: 40px;
	height: 44px;
	padding: 4px 1px;
	background-clip: content-box;  /* видимая «таблетка» 38×36, а нажимать можно на все 44px */
	background-color: transparent;
	border: 0;
	border-radius: 22px;
	font-size: 13px;
	cursor: pointer;
}
.lang__btn[aria-pressed="true"] {
	background-color: var(--c-text);
	color: #fff;
	font-weight: 500;
}

/* ==========================================================================
   ШАПКА
   ========================================================================== */
.site-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 40;
	padding-top: env(safe-area-inset-top);
}
.site-header__inner {
	height: var(--header-h);
	padding: 0 16px 0 var(--pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.site-nav,
.site-header__phone,
.site-header__cta { display: none; }

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.menu-toggle {
	height: 44px;
	padding: 0 18px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 0;
	border-radius: 22px;
	font-size: 14px;
	letter-spacing: .04em;
	cursor: pointer;
}
.menu-toggle__bars { display: flex; flex-direction: column; gap: 4px; width: 16px; }
.menu-toggle__bars span { display: block; height: 1.5px; background: currentColor; }

@media (max-width: 374px) {
	.site-header__inner { padding-left: 16px; gap: 8px; }
	.menu-toggle { padding: 0 14px; gap: 8px; }
}

/* Шапка после прокрутки первого экрана: белая, с линией, закреплена сверху */
.site-header.is-fixed {
	position: fixed;
	background: #fff;
	border-bottom: 1px solid var(--c-line);
	animation: header-in .3s var(--ease-out);
}
.site-header.is-fixed .site-header__inner { height: 64px; }
.site-header.is-fixed .lang,
.site-header.is-fixed .menu-toggle { background: var(--c-chip); }

@keyframes header-in { from { transform: translateY(-100%); } }

/* ==========================================================================
   ПОЛНОЭКРАННОЕ МЕНЮ
   ========================================================================== */
.menu {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	flex-direction: column;
	background: #fff;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
	opacity: 0;
	transition: opacity .25s;
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
/* если меню открыли после прокрутки — шапка меню той же высоты, что белая закреплённая шапка */
.menu.is-compact .menu__head { height: 64px; border-bottom: 1px solid transparent; }

.menu__head {
	height: var(--header-h);
	flex-shrink: 0;
	padding: 0 16px 0 var(--pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.menu__close {
	height: 44px;
	padding: 0 18px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--c-chip);
	border: 0;
	border-radius: 22px;
	font-size: 14px;
	letter-spacing: .04em;
	cursor: pointer;
}

.menu__nav {
	padding: 20px var(--pad) 0;
	display: flex;
	flex-direction: column;
}
.menu__nav a {
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 1px solid var(--c-line);
	font-size: 26px;
	font-weight: 300;
	line-height: 1.2;
}
.menu__nav svg { flex-shrink: 0; color: var(--c-text-2); }

.menu__foot {
	margin-top: auto;
	padding: 32px var(--pad) 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.menu__foot .lang { align-self: flex-start; }
.menu__phone {
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 20px;
}
.menu__social { display: flex; gap: 10px; }
.menu__social .btn {
	flex: 1;
	height: 48px;
	padding: 0 12px;
	border-color: var(--c-border);
	font-size: 15px;
	letter-spacing: 0;
}

/* На планшете содержимое меню не растягивается на всю ширину */
@media (min-width: 640px) {
	.menu__nav, .menu__foot { width: 100%; max-width: 600px; }
}

/* Пока открыто меню, страница под ним не прокручивается */
body.menu-open { position: fixed; left: 0; right: 0; overflow: hidden; }

/* ==========================================================================
   ПЕРВЫЙ ЭКРАН — ТЕЛЕФОН
   ========================================================================== */
.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	background: var(--c-tone);
	overflow: hidden;
}

/* Видео занимает место над белой панелью (минимум 240px) и немного заходит под её скругление */
.hero__media {
	position: relative;
	flex: 1 0 240px;
	margin-bottom: -28px;
	background: var(--c-tone);
}
/* Лёгкая светлая дымка сверху — логотип и кнопки шапки читаются на любом видео */
.hero__media::after {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 140px;
	background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
	pointer-events: none;
}
.hero__img,
.hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 12%;
	animation: media-in 1.2s var(--ease-out) both;
}

.hero__video { object-position: 50% 50%; }

.hero__panel {
	position: relative;
	flex-shrink: 0;
	min-height: 472px;
	padding: 28px var(--pad) 24px;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 28px 28px 0 0;
	animation: panel-in .8s var(--ease-out) .15s both;   /* панель выезжает снизу */
}

.hero__title {
	margin-top: 10px;
	font-size: 44px;
	font-weight: 300;
	line-height: 1.02;
	letter-spacing: -.01em;
}

.hero__pills { margin-top: 20px; }

.hero__info {
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}
.hero__info a {
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 15px;
	line-height: 1.3;
}
.hero__info svg { flex-shrink: 0; }

.hero__actions {
	margin-top: auto;
	padding-top: 24px;
	display: flex;
	gap: 10px;
}
.hero__cta { flex: 1; min-width: 0; padding: 0 16px; }
.hero__wa { width: 56px; padding: 0; flex-shrink: 0; }
.hero__wa-text { display: none; }

@media (max-height: 740px) and (max-width: 1023px) {
	.hero__media { flex-basis: 200px; }
	.hero__panel { min-height: 0; }
}
/* Совсем невысокие экраны: кнопка записи должна помещаться на первом экране */
@media (max-height: 680px) and (max-width: 1023px) {
	.hero__media { flex-basis: 140px; }
	.hero__panel { padding-top: 24px; }
	.hero__title { font-size: 38px; }
	.hero__pills { margin-top: 16px; }
	.hero__info { margin-top: 8px; }
	.hero__actions { padding-top: 16px; }
}

@keyframes panel-in { from { transform: translateY(40%); } }
@keyframes media-in { from { opacity: 0; transform: scale(1.04); } }

/* ==========================================================================
   ПАНЕЛЬ ЗАПИСИ ВНИЗУ (телефон, после первого экрана)
   ========================================================================== */
.book-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 30;
	display: flex;
	gap: 10px;
	padding: 12px var(--pad) max(24px, calc(env(safe-area-inset-bottom) + 8px));
	background: #fff;
	border-top: 1px solid var(--c-line);
	transform: translateY(100%);
	visibility: hidden;
	transition: transform .35s var(--ease-out), visibility 0s .35s;
}
.book-bar.is-visible {
	transform: none;
	visibility: visible;
	transition: transform .35s var(--ease-out);
}
.book-bar__cta { flex: 1; min-width: 0; padding: 0 16px; }

@media (max-width: 1023px) {
	/* место под панель записи, чтобы она не закрывала низ страницы */
	body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   ОБЩЕЕ ДЛЯ РАЗДЕЛОВ
   ========================================================================== */
.section-head { display: flex; flex-direction: column; gap: 12px; }
.h2 {
	font-size: 34px;
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -.01em;
}

/* ==========================================================================
   О ДОКТОРЕ
   ========================================================================== */
.about {
	padding: 64px var(--pad) 0;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.about__photo {
	width: 100%;
	aspect-ratio: 3 / 4;           /* кадр чуть выше, чтобы руки и локти помещались целиком */
	height: auto;
	object-fit: cover;
	object-position: 50% 30%;
	border-radius: 16px;
	background: var(--c-bg-2);
}
.about__text { display: flex; flex-direction: column; gap: 14px; }
.about__lead { font-size: 18px; line-height: 1.6; font-weight: 300; }
.about__note { font-size: 16px; line-height: 1.6; color: var(--c-text-2); }
.about__cta { display: none; }   /* на телефоне кнопка записи уже есть в нижней панели */

/* ==========================================================================
   УСЛУГИ
   ========================================================================== */
.services {
	padding: 28px var(--pad) 72px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.services__grid { display: grid; gap: 12px; }

.card {
	padding: 22px 20px 10px;
	background: var(--c-bg-2);
	border-radius: 20px;
}
.card__title { margin-bottom: 12px; font-size: 22px; font-weight: 400; line-height: 1.2; }
.card__list { margin: 0; padding: 0; list-style: none; }
.card__list li {
	padding: 12px 0;
	border-top: 1px solid var(--c-line);
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.card__item { font-size: 17px; line-height: 1.35; }
.card__note { font-size: 14px; line-height: 1.4; color: var(--c-text-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
	height: 32px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: 16px;
	font-size: 14px;
}

/* Планшет: фото не на всю ширину, карточки в 2 колонки */
@media (min-width: 640px) and (max-width: 1023px) {
	.about { --pad: 40px; }
	.services { --pad: 40px; }
	.about__photo { max-width: 480px; }
	.about__text { max-width: 600px; }
}
@media (min-width: 640px) and (max-width: 1279px) {
	.services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
}

/* ==========================================================================
   ЦИТАТА
   ========================================================================== */
.quote {
	padding: 72px 28px;
	background: var(--c-tone);
}
.quote__inner {
	margin: 0 auto;
	max-width: 900px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	text-align: center;
}
.quote__arc {
	width: 46px;
	height: 8px;
	overflow: visible;
	fill: none;
	stroke: var(--c-accent);
	stroke-width: 1.5;
	stroke-linecap: round;
}
.quote__arc path { vector-effect: non-scaling-stroke; }
.quote__text { margin: 0; }
.quote__text p {
	font-size: 30px;
	font-weight: 300;
	line-height: 1.3;
	letter-spacing: -.005em;
}
.quote__author {
	font-size: 14px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #3F4A51;
}

/* ==========================================================================
   ПОРТФОЛИО
   ========================================================================== */
.portfolio {
	padding: 72px var(--pad);
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.section-lead {
	margin-top: 4px;
	font-size: 16px;
	line-height: 1.55;
	color: var(--c-text-2);
}
.portfolio__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.portfolio__item {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	background: var(--c-bg-2);
	cursor: zoom-in;
}
.portfolio__item img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform .4s var(--ease-out);
}
@media (hover: hover) { .portfolio__item:hover img { transform: scale(1.03); } }
.portfolio__more { height: 52px; gap: 10px; }

@media (min-width: 640px) and (max-width: 1023px) {
	.portfolio { --pad: 40px; }
	.portfolio__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
	.portfolio__more { align-self: flex-start; }
}

/* ==========================================================================
   ОБРАЗОВАНИЕ
   ========================================================================== */
.education {
	padding: 64px 0 72px;
	background: var(--c-bg-2);       /* фон на всю ширину экрана */
}
.education__inner {
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.education__head,
.timeline,
.docs__title,
.docs__hint { margin-left: var(--pad); margin-right: var(--pad); }

.timeline {
	padding: 0;
	list-style: none;
	border-left: 1px solid var(--c-border);
}
.timeline li {
	position: relative;
	padding: 0 0 24px 20px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {             /* точка на линии */
	content: "";
	position: absolute;
	left: -5px;
	top: 5px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--c-accent);
}
.timeline__years { font-size: 14px; color: var(--c-text-2); }
.timeline__text { font-size: 17px; line-height: 1.45; }

.docs { display: flex; flex-direction: column; gap: 16px; }
.docs__row {                       /* горизонтальная лента с прокруткой пальцем */
	display: flex;
	gap: 10px;
	padding: 0 var(--pad) 4px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 var(--pad);
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.docs__row::-webkit-scrollbar { display: none; }
.docs__item {
	flex: 0 0 150px;
	scroll-snap-align: start;
	border: 1px solid var(--c-line);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	cursor: zoom-in;
	transition: border-color .2s;
}
.docs__item img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1.414;       /* пропорция листа А4 */
	object-fit: cover;
	object-position: top;
}
@media (hover: hover) { .docs__item:hover { border-color: var(--c-border); } }
.docs__hint { font-size: 13px; color: var(--c-text-2); }
.docs__hint-d { display: none; }

@media (min-width: 640px) and (max-width: 1023px) {
	.education { --pad: 40px; }
	.education__head, .timeline { max-width: 600px; }
	.docs__item { flex-basis: 180px; }
}

/* ==========================================================================
   КАРТОЧКА INSTAGRAM
   ========================================================================== */
.insta { padding: 72px var(--pad) 0; }
.insta__card {
	padding: 32px 24px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	background: var(--c-text);
	color: #fff;
	border-radius: 24px;
}
.insta__text { display: flex; flex-direction: column; gap: 16px; }
.insta__title { font-size: 28px; font-weight: 300; line-height: 1.15; }
.insta__lead { font-size: 16px; line-height: 1.55; color: #C9CED2; }
.insta__btn { height: 52px; background: #fff; color: var(--c-text); }
@media (hover: hover) { .insta__btn:hover { background: var(--c-tone); color: var(--c-text); } }
.insta__card :focus-visible { outline-color: #fff; }

@media (min-width: 640px) and (max-width: 1023px) {
	.insta { --pad: 40px; }
	.insta__btn { align-self: flex-start; padding: 0 36px; }
}

/* ==========================================================================
   ВОПРОСЫ И ОТВЕТЫ
   ========================================================================== */
.faq {
	padding: 72px var(--pad);
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.faq__list { border-top: 1px solid var(--c-line); }
.faq__item { border-bottom: 1px solid var(--c-line); }
.faq__q {
	min-height: 64px;
	padding: 16px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	font-size: 18px;
	line-height: 1.35;
	list-style: none;
	cursor: pointer;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q svg { flex-shrink: 0; }
.faq__q .i-v { transition: opacity .2s; }
.faq__item[open] .faq__q .i-v { opacity: 0; }   /* открыт — «минус», закрыт — «плюс» */
.faq__a {
	max-width: 720px;
	margin-bottom: 20px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--c-text-2);
}

/* ==========================================================================
   КОНТАКТЫ, КАРТА, ФОРМА
   ========================================================================== */
.contacts {
	padding: 64px var(--pad) 72px;
	background: var(--c-bg-2);
}
.contacts__inner,
.contacts__info {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list a {
	min-height: 44px;
	padding: 4px 0;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	line-height: 1.35;
}
.contact-list svg { flex-shrink: 0; }

.map { display: flex; flex-direction: column; gap: 12px; }
.map__frame {
	position: relative;
	height: 240px;
	border-radius: 20px;
	overflow: hidden;
	background: var(--c-tone);
}
.map__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.map__fallback {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 15px;
	color: #3F4A51;
}
.map__route { height: 52px; gap: 10px; }

.lead-card {
	padding: 24px 20px;
	background: #fff;
	border-radius: 24px;
}
.lead-form { display: flex; flex-direction: column; gap: 16px; }
.lead-form[hidden], .lead-done[hidden] { display: none; }
.lead-card__title { font-size: 22px; font-weight: 400; line-height: 1.2; }
.lead-card__lead { margin-top: -8px; font-size: 15px; line-height: 1.5; color: var(--c-text-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; flex-direction: column; gap: 16px; }
.field label { font-size: 14px; color: var(--c-text-2); }
.field input,
.field textarea {
	transition: border-color .2s, box-shadow .2s;
	width: 100%;
	height: 52px;
	padding: 0 16px;
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: 14px;
	font: inherit;
	font-size: 16px;                 /* 16px — чтобы iPhone не увеличивал страницу при вводе */
	color: var(--c-text);
	-webkit-appearance: none;
	appearance: none;
}
.field textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: #9AA1A6; }
.field input:focus,
.field textarea:focus {
	border-color: var(--c-accent);                    /* цвет дуги логотипа */
	box-shadow: 0 0 0 4px rgba(95, 129, 150, .14);    /* лёгкое свечение вокруг поля */
	outline: none;
}
.field [aria-invalid="true"] { border-color: #B4432F; }
.field__error,
.lead-form__status { font-size: 13px; line-height: 1.4; color: #B4432F; }
.lead-form__status { font-size: 14px; }

.lead-form__submit { width: 100%; }
.lead-form__submit[aria-busy="true"] { opacity: .7; cursor: progress; }
.lead-form__consent { font-size: 12px; line-height: 1.5; color: var(--c-text-2); }

/* Ловушка для ботов — скрыта от людей */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Экран «Спасибо, заявка отправлена» */
.lead-done {
	padding: 16px 4px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	text-align: center;
	outline: none;
}
.lead-done__icon {
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--c-accent);
	border-radius: 50%;
}
.lead-done__title { margin-top: 8px; font-size: 26px; font-weight: 300; line-height: 1.2; }
.lead-done__text { max-width: 420px; font-size: 16px; line-height: 1.55; color: var(--c-text-2); }
.lead-done__urgent { margin-top: 6px; font-size: 15px; color: var(--c-text-2); }
.lead-done__wa { width: 100%; max-width: 420px; gap: 10px; }
.lead-done__back {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	border-bottom: 1px solid var(--c-text);
	font-size: 15px;
}

@media (min-width: 640px) and (max-width: 1023px) {
	.faq, .contacts { --pad: 40px; }
	.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lead-card { padding: 32px; }
}

/* ==========================================================================
   ПОДВАЛ
   ========================================================================== */
.site-footer {
	padding: 48px var(--pad) 44px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}
.site-footer__copy { font-size: 13px; color: var(--c-text-2); }

/* ==========================================================================
   ПРОСМОТР ФОТО КРУПНО (лайтбокс)
   ========================================================================== */
.lightbox {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
}
.lightbox::backdrop { background: #16181B; }   /* плотный графит — страница под фото не просвечивает */
.lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
	animation: lb-in .2s ease-out;
}
.lightbox__img {
	max-width: calc(100% - 32px);
	max-height: calc(100% - 160px);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 12px;
	background: rgba(255, 255, 255, .06);
	touch-action: pan-y;
	user-select: none;
}
.lightbox__btn {
	position: absolute;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: rgba(255, 255, 255, .12);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background-color .2s;
}
@media (hover: hover) { .lightbox__btn:hover { background: rgba(255, 255, 255, .24); } }
.lightbox__close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lightbox__prev,
.lightbox__next { bottom: calc(24px + env(safe-area-inset-bottom)); }
.lightbox__prev { left: calc(50% - 112px); }
.lightbox__next { right: calc(50% - 112px); }
.lightbox__count {
	position: absolute;
	left: 50%;
	bottom: calc(36px + env(safe-area-inset-bottom));
	transform: translateX(-50%);
	font-size: 14px;
	letter-spacing: .08em;
	color: rgba(255, 255, 255, .75);
}
.lightbox.is-single .lightbox__prev,
.lightbox.is-single .lightbox__next,
.lightbox.is-single .lightbox__count { display: none; }
html.lb-open { overflow: hidden; }
html.lb-open .book-bar { visibility: hidden; }   /* пока открыто фото, панель записи убираем */
.lightbox:focus { outline: none; }

@keyframes lb-in { from { opacity: 0; } }

/* ==========================================================================
   КОМПЬЮТЕР (от 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
	:root { --header-h: 96px; }

	.site-header__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 64px; gap: 24px; }
	.site-header.is-fixed .site-header__inner { height: 72px; }
	.logo__word { font-size: 26px; padding-bottom: 10px; }

	.site-header__actions { gap: 24px; }
	.site-header__phone {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		font-size: 16px;
		font-weight: 500;
		white-space: nowrap;
	}
	.site-header__cta { display: inline-flex; }

	/* Языки на компьютере — текстом: RU · KZ · EN */
	.site-header__lang,
	.site-header.is-fixed .site-header__lang { height: auto; padding: 0; gap: 4px; background: none; }
	.site-header__lang .lang__btn {
		width: auto;
		padding: 0 4px;
		background: none;
		color: var(--c-text-2);
		font-size: 14px;
	}
	.site-header__lang .lang__btn[aria-pressed="true"] { background: none; color: var(--c-text); }
	.site-header__lang .lang__btn + .lang__btn::before {
		content: "·";
		margin-right: 8px;
		color: var(--c-border);
		font-weight: 400;
	}
	.menu-toggle { background: var(--c-chip); }
	.site-header.is-fixed .menu-toggle { background: var(--c-chip); }

	.eyebrow { font-size: 14px; letter-spacing: .2em; }

	/* Первый экран: слева текст, справа скруглённый блок под видео */
	.hero {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 64px;
		min-height: clamp(720px, 100vh, 1000px);
		max-width: var(--max-w);
		margin: 0 auto;
		padding: var(--header-h) 24px 24px 64px;
		background: #fff;
	}
	.hero__media {
		position: relative;
		margin: 0;
		order: 2;
		border-radius: 32px;
		overflow: hidden;
	}
	.hero__media::after { display: none; }
	.hero__img { object-position: 50% 20%; }

	.hero__panel {
		order: 1;
		margin: 0;
		min-height: 0;
		padding: 0 0 40px;
		justify-content: center;
		background: none;
		border-radius: 0;
		animation: text-in .9s var(--ease-out) .1s both;
	}
	.hero__title {
		margin-top: 18px;
		font-size: clamp(60px, 6.7vw, 96px);
		line-height: 1;
		letter-spacing: -.015em;
	}
	.hero__pills { margin-top: 36px; gap: 10px; }
	.hero__pills .pill { height: 44px; padding: 0 20px; border-radius: 22px; font-size: 16px; }
	.hero__pills .pill::after { inset: 0; }
	.hero__info { margin-top: 24px; }
	.hero__info a { font-size: 17px; }
	.hero__info-phone { display: none; }   /* телефон на компьютере — в шапке */

	.hero__actions { margin-top: 44px; padding: 0; gap: 12px; }
	.hero__cta { flex: 0 0 auto; height: 60px; padding: 0 36px; font-size: 17px; }
	.hero__wa { width: 60px; height: 60px; }   /* на узком компьютере — круглая кнопка со значком */

	.book-bar { display: none; }

	/* О докторе: слева фото, справа текст */
	.about {
		max-width: var(--max-w);
		margin: 0 auto;
		padding: clamp(96px, 8.3vw, 120px) clamp(64px, 8.3vw, 120px) 0;
		display: grid;
		grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
		grid-template-rows: 1fr auto auto 1fr;
		grid-template-areas: "photo ." "photo head" "photo text" "photo .";
		column-gap: clamp(56px, 6.7vw, 96px);
		row-gap: 0;
	}
	.about__photo { grid-area: photo; border-radius: 28px; }
	.about__head { grid-area: head; gap: 14px; margin-bottom: 28px; }
	.about__text { grid-area: text; gap: 28px; }
	.h2 { font-size: clamp(42px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -.015em; }
	.about__lead { max-width: 560px; font-size: clamp(20px, 1.67vw, 24px); line-height: 1.55; }
	.about__note { max-width: 560px; margin-top: -14px; font-size: 18px; }
	.about__cta { display: inline-flex; align-self: flex-start; margin-top: 8px; padding: 0 36px; }

	/* Услуги */
	.services {
		max-width: var(--max-w);
		margin: 0 auto;
		padding: 72px clamp(64px, 8.3vw, 120px) 112px;
		gap: 20px;
	}
	.services__grid { gap: 20px; }

	/* Цитата */
	.quote { padding: 104px 120px; }
	.quote__inner { gap: 24px; }
	.quote__arc { width: 64px; height: 11px; }
	.quote__text p { font-size: clamp(44px, 3.9vw, 56px); line-height: 1.2; letter-spacing: -.01em; }
	.quote__author { font-size: 15px; }

	/* Портфолио: заголовок слева, кнопка Instagram справа, фото в 4 колонки */
	.portfolio {
		max-width: var(--max-w);
		margin: 0 auto;
		padding: clamp(96px, 8.3vw, 120px) clamp(64px, 8.3vw, 120px);
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "head more" "grid grid";
		align-items: end;
		column-gap: 64px;
		row-gap: 48px;
	}
	.portfolio__head { grid-area: head; gap: 14px; }
	.section-lead { max-width: 560px; margin-top: 6px; font-size: 18px; line-height: 1.6; }
	.portfolio__more { grid-area: more; height: 56px; padding: 0 32px; }
	.portfolio__grid { grid-area: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
	.portfolio__item { border-radius: 16px; }

	/* Образование: слева заголовок и текст, справа таймлайн, ниже документы в ряд */
	.education { padding: 112px 0; }
	.education__inner {
		max-width: var(--max-w);
		margin: 0 auto;
		padding: 0 clamp(64px, 8.3vw, 120px);
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas: "head line" "docs docs";
		column-gap: clamp(56px, 6.7vw, 96px);
		row-gap: 56px;
	}
	.education__head, .timeline, .docs__title, .docs__hint { margin-left: 0; margin-right: 0; }
	.education__head { grid-area: head; gap: 14px; }
	.timeline { grid-area: line; margin-top: 40px; }
	.timeline li { padding: 0 0 32px 28px; gap: 6px; }
	.timeline li::before { top: 6px; }
	.timeline__years { font-size: 15px; }
	.timeline__text { font-size: 20px; }
	.docs { grid-area: docs; gap: 20px; }
	.docs__row {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 20px;
		padding: 0;
		overflow: visible;
	}
	.docs__item { border-radius: 16px; }
	.docs__hint { font-size: 14px; }
	.docs__hint-m { display: none; }
	.docs__hint-d { display: inline; }

	/* Instagram-карточка: текст слева, кнопка справа */
	.insta {
		max-width: var(--max-w);
		margin: 0 auto;
		padding: 112px clamp(64px, 8.3vw, 120px) 0;
	}
	.insta__card {
		padding: 64px 72px;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 64px;
		border-radius: 32px;
	}
	.insta__text { max-width: 640px; gap: 18px; }
	.insta__title { font-size: clamp(36px, 3.1vw, 44px); line-height: 1.12; }
	.insta__lead { font-size: 18px; line-height: 1.6; }
	.insta__btn { flex-shrink: 0; height: 60px; padding: 0 40px; font-size: 17px; }

	/* Вопросы: заголовок слева, аккордеон справа */
	.faq {
		max-width: var(--max-w);
		margin: 0 auto;
		padding: 112px clamp(64px, 8.3vw, 120px);
		display: grid;
		grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
		gap: clamp(56px, 6.7vw, 96px);
		align-items: start;
	}
	.faq__head { gap: 14px; }
	.faq__q { min-height: 72px; font-size: 20px; }

	/* Контакты: слева список и карта, справа форма */
	.contacts { padding: 112px 0; }
	.contacts__inner {
		max-width: var(--max-w);
		margin: 0 auto;
		padding: 0 clamp(64px, 8.3vw, 120px);
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas: "head head" "info form";
		column-gap: 48px;
		row-gap: 56px;
		align-items: start;
	}
	.contacts__head { grid-area: head; gap: 14px; }
	.contacts__info { grid-area: info; }
	.lead-card { grid-area: form; padding: 40px; border-radius: 28px; }
	.contact-list a { font-size: 18px; }
	.map__frame { height: 320px; border-radius: 24px; }
	.map__route { align-self: flex-start; height: 56px; padding: 0 32px; }
	.lead-form { gap: 18px; }
	.lead-card__title { font-size: 28px; }
	.lead-card__lead { font-size: 16px; }
	.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lead-form__submit { height: 60px; font-size: 17px; }
	.lead-form__consent { font-size: 13px; }
	.lead-done { padding: 40px 16px 16px; }

	/* Подвал: логотип слева, © справа */
	.site-footer {
		max-width: var(--max-w);
		margin: 0 auto;
		padding: 64px clamp(64px, 8.3vw, 120px);
		flex-direction: row;
		justify-content: space-between;
		text-align: left;
	}
	.site-footer__copy { font-size: 14px; }

	/* Меню на планшете/ноутбуке: шапка меню стоит там же, где шапка сайта */
	.menu__head { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 64px; }
	.menu.is-compact .menu__head { height: 72px; }
	.menu .logo__word { font-size: 26px; padding-bottom: 10px; }

	/* Лайтбокс: стрелки по бокам */
	.lightbox__img { max-width: calc(100% - 200px); max-height: calc(100% - 96px); }
	.lightbox__prev, .lightbox__next { top: 50%; bottom: auto; transform: translateY(-50%); width: 56px; height: 56px; }
	.lightbox__prev { left: 32px; }
	.lightbox__next { right: 32px; }
	.lightbox__close { top: 24px; right: 32px; width: 56px; height: 56px; }
	.lightbox__count { bottom: 28px; }
}

@keyframes text-in { from { opacity: 0; transform: translateY(24px); } }

/* Полное меню в шапке — только на широком экране, иначе кнопка «Меню» */
@media (min-width: 1280px) {
	.services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
	.hero__cta { padding: 0 40px; }
	.hero__wa { width: auto; padding: 0 28px; gap: 10px; font-size: 17px; }
	.hero__wa-text { display: inline; }
	.hero__wa svg { width: 20px; height: 20px; }

	.site-nav {
		display: flex;
		gap: 28px;
		font-size: 15px;
		white-space: nowrap;
	}
	.site-nav a { display: inline-flex; align-items: center; min-height: 44px; }
	.menu-toggle { display: none; }
}
@media (min-width: 1280px) and (max-width: 1399px) {
	.site-nav { gap: 22px; }
}

/* Простые страницы (например, политика конфиденциальности) */
.page-simple { max-width: 760px; margin: 0 auto; padding: 120px var(--pad) 80px; }
.page-simple h1 { font-size: 36px; font-weight: 300; margin-bottom: 24px; }

/* Кто отключил анимацию в настройках телефона — без анимации */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-delay: 0s !important;
		transition-duration: .01ms !important;
	}
}
