/* ===== Базовые ===== */

:root {
	--bg: #F5F2EC;
	--bg2: #E9E4DA;
	--ink: #15171C;
	--muted: #4A4F58;
	--line: #E4DED3;
	--line2: #D9D1C3;
	--accent: #C8431C;
	--teal: #0F6B68;
	--white: #FFF;
	--dark2: #22252C;
	--soft: #A7ABB3;
	--f-head: 'Unbounded', sans-serif;
	--f-body: 'Onest', 'Segoe UI', sans-serif;
	--pad: 20px;
	--blue: #0011C5;
	--orange: #FF8E00;
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.5 var(--f-body);
	padding-top: env(safe-area-inset-top, 0);
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	opacity: 0.85;
}

img,
svg {
	max-width: 100%;
}

input,
textarea,
button {
	font: inherit;
}

h1,
h2,
h3 {
	margin: 0;
	font-family: var(--f-head);
	font-weight: 500;
	letter-spacing: -0.02em;
}

h2 {
	font-size: 24px;
	line-height: 1.2;
}

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

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

.section {
	padding: 48px 0;
}

.ic {
	flex-shrink: 0;
}

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

.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 56px;
	padding: 0 28px;
	border-radius: 999px;
	border: 1.5px solid transparent;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.2s;
}

.btn-sm {
	height: 48px;
	font-size: 15px;
	flex: 1;
}

.btn-accent {
	background: var(--accent);
	color: var(--white);
}

.btn-teal {
	background: var(--teal);
	color: var(--white);
}

.btn-white {
	background: var(--white);
	color: var(--teal);
}

.btn-blue {
	background: var(--blue);
	color: var(--white);
}

.btn-light {
	background: var(--white);
	color: var(--blue);
}

.btn-line {
	border-color: var(--ink);
}

.btn:active {
	transform: scale(0.98);
}

/* ===== Шапка ===== */

.header {
	position: sticky;
	top: env(safe-area-inset-top, 0);
	z-index: 50;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}

.header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.logo {
	font-family: var(--f-head);
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.logo span {
	color: var(--accent);
}

.logo img {
	display: block;
	width: auto;
	height: 38px;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.icon-btn {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ink);
	cursor: pointer;
}

.icon-btn.wa {
	background: var(--accent);
	color: var(--white);
}

.nav {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 64px;
	flex-direction: column;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
	padding: 8px var(--pad) 20px;
}

.nav.open {
	display: flex;
}

.nav a {
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
	font-weight: 500;
}

.nav a:last-child {
	border: 0;
}

/* ===== Hero ===== */

.hero {
	position: relative;
	overflow: hidden;
	min-height: 1020px;
	padding: 36px 0 40px;
	background-color: rgb(230, 223, 211);
	background-image: linear-gradient(to bottom, rgb(230, 223, 211) 0%, rgb(230, 223, 211) 28%, rgba(230, 223, 211, 0.75) 42%, rgba(230, 223, 211, 0.3) 52%, rgba(230, 223, 211, 0) 62%), url(../images/hero.jpg);
	background-position: center, center bottom;
	background-size: 100% 100%, auto 530px;
	background-repeat: no-repeat;
}

.hero .container {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.hero h1 {
	font-size: 30px;
	line-height: 1.15;
}

.hero p {
	margin: 0;
	font-size: 17px;
	color: var(--muted);
}

.hero h1,
.hero p {
	text-shadow: 0 1px 12px rgb(230, 223, 211);
}

.badge {
	align-self: flex-start;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--line2);
	font-size: 12px;
	font-weight: 500;
	color: var(--muted);
}

.hero-btns {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pulse {
	position: absolute;
	left: 0;
	top: 150px;
	width: 100%;
	height: 120px;
	z-index: 0;
	pointer-events: none;
}

.pulse path {
	fill: none;
	stroke: var(--accent);
	stroke-width: 2;
	stroke-linejoin: round;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
}

.pulse-base {
	opacity: 0.12;
}

.pulse-run {
	opacity: 0.55;
	stroke-dasharray: 160 840;
	stroke-dashoffset: 1000;
	animation: run 3.2s linear infinite;
}

.blob {
	position: absolute;
	width: 320px;
	height: 320px;
	right: -120px;
	top: -80px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(200, 67, 28, 0.16), rgba(200, 67, 28, 0) 70%);
	animation: drift 12s ease-in-out infinite alternate;
	z-index: 0;
	pointer-events: none;
}

@keyframes run {
	to {
		stroke-dashoffset: 0
	}

	;
}

@keyframes drift {
	to {
		transform: translate(-60px, 90px) scale(1.15)
	}

	;
}

/* ===== Цифры ===== */

.stats .container {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px 16px;
	padding-top: 28px;
	padding-bottom: 48px;
	border-top: 1px solid var(--line);
}

.stat b {
	display: block;
	font-family: var(--f-head);
	font-size: 26px;
	font-weight: 500;
}

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

/* .underlined-one {
	font-size: 32px;
	color: black;
	text-decoration: underline;
	text-underline-offset: 0px;
	display: inline-block;
} */

/* ===== Маркетинг ===== */

.marketing {
	background: var(--teal);
	color: var(--white);
}

.marketing .container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
}

.lead {
	margin: 0 0 8px;
	opacity: 0.85;
}

.cards4 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.tile {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.09);
}

.tile .n {
	font-family: var(--f-head);
	font-size: 14px;
	opacity: 0.7;
}

.tile b {
	font-size: 17px;
}

.tile span {
	font-size: 15px;
	opacity: 0.85;
}

.marketing .btn {
	margin-top: 8px;
}

/* ===== Продукты ===== */

.products {
	background: var(--white);
}

.products .container {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.product-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.product {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 28px 24px;
	border-radius: 24px;
	background: var(--bg);
}

.product-head {
	display: flex;
	align-items: center;
	gap: 14px;
}

.logo-ph {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	/* border: 1.5px dashed #B9AF9E; */
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: #6A6F78;
	flex-shrink: 0;
}

.product small {
	display: block;
	font-size: 13px;
	font-weight: 600;
}

.product h3 {
	font-size: 20px;
}

.checks {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 15px;
	flex-grow: 1;
}

.checks li {
	display: flex;
	gap: 10px;
}

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

.t-teal {
	color: var(--teal);
}

.t-accent {
	color: var(--accent);
}

.t-blue {
	color: var(--blue);
}

/* ===== Как начать ===== */

.steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-top: 20px;
}

.step {
	display: flex;
	gap: 16px;
	padding: 20px;
	border-radius: 20px;
	background: var(--white);
}

.step .n {
	font-family: var(--f-head);
	font-size: 18px;
	color: var(--accent);
}

.step b {
	display: block;
	font-size: 17px;
}

.step span {
	color: var(--muted);
	font-size: 15px;
}

/* ===== Отзывы ===== */

.reviews {
	background: var(--ink);
	color: var(--bg);
}

.reviews .container {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.logos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.logos div {
	height: 56px;
	border-radius: 12px;
	border: 1px dashed var(--muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: var(--soft);
}

.quotes {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.quote {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	border-radius: 20px;
	background: var(--dark2);
}

.quote blockquote {
	margin: 0;
}

.quote figcaption {
	color: var(--soft);
	font-size: 14px;
}

/* ===== FAQ ===== */

.faq-list {
	margin-top: 12px;
	border-bottom: 1px solid var(--line2);
}

.faq-item {
	padding: 18px 0;
	border-top: 1px solid var(--line2);
}

.faq-item b {
	display: block;
	font-size: 17px;
}

.faq-item span {
	color: var(--muted);
	font-size: 15px;
}

/* ===== Контакты ===== */

.contact {
	background: var(--white);
}

.contact .container {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.contact p {
	margin: 0;
	color: var(--muted);
}

.form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 24px 20px;
	border-radius: 24px;
	background: var(--bg);
}

.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}

.field input {
	height: 52px;
	padding: 0 16px;
	border-radius: 12px;
	border: 1px solid var(--line2);
	background: var(--white);
	font-size: 16px;
	font-weight: 400;
}

.field input.err {
	border-color: var(--accent);
}

.agree {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	color: var(--muted);
}

.agree input {
	width: 20px;
	height: 20px;
	margin: 0;
	flex-shrink: 0;
	accent-color: var(--accent);
}

.form-msg {
	margin: 0;
	min-height: 1.2em;
	font-size: 13px;
	color: var(--accent);
}

.contact-links {
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-weight: 500;
}

.contact-links a {
	display: flex;
	align-items: center;
	gap: 10px;
}

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

.footer {
	background: var(--ink);
	color: var(--bg);
	padding: 36px 0 32px;
}

.footer .container {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.footer .logo img {
	height: 44px;
}

.footer-desc {
	color: var(--soft);
	font-size: 14px;
}

.footer-contacts {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 15px;
}

.footer-contacts div {
	color: var(--soft);
}

.copy {
	padding-top: 16px;
	border-top: 1px solid #2E323A;
	font-size: 12px;
	color: var(--soft);
}

/* ===== Анимация появления ===== */

.reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
	opacity: 1;
	transform: none;
}

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

	.pulse-run,
	.blob {
		animation: none;
	}

	.reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ===== Планшет ≥ 768px ===== */

@media (min-width: 768px) {
	:root {
		--pad: 32px;
	}

	.logo img {
		height: 42px;
	}

	h2 {
		font-size: 30px;
	}

	.hero {
		background-size: 100% 100%, 100% auto;
	}

	.section {
		padding: 72px 0;
	}

	.hero h1 {
		font-size: 40px;
	}

	.hero-btns {
		flex-direction: row;
	}

	.hero-btns .btn {
		flex: 0 0 auto;
	}

	.stats .container {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 24px;
		padding-bottom: 64px;
	}

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

	.marketing .btn {
		align-self: flex-start;
	}

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

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

	.logos {
		max-width: 560px;
	}

	.form {
		padding: 32px;
	}
}

/* ===== Десктоп ≥ 1024px ===== */

@media (min-width: 1024px) {
	:root {
		--pad: 40px;
	}

	.logo img {
		height: 46px;
	}

	.header .container {
		height: 76px;
	}

	.menu-btn {
		display: none;
	}

	.nav {
		display: flex;
		position: static;
		flex-direction: row;
		gap: 32px;
		padding: 0;
		border: 0;
		background: none;
	}

	.nav a {
		padding: 0;
		border: 0;
		font-size: 15px;
	}

	.header-actions {
		order: 3;
	}

	.nav {
		order: 2;
	}

	.header .container {
		gap: 32px;
	}

	.logo {
		order: 1;
		margin-right: auto;
	}

	.hero {
		min-height: 760px;
		padding: 96px 0 80px;
		background-color: rgb(230, 223, 211);
		background-image: linear-gradient(to right, rgb(230, 223, 211) 0%, rgb(230, 223, 211) 38%, rgba(230, 223, 211, 0) 72%), url(../images/hero.jpg);
		background-position: center, center bottom;
		background-size: 100% 100%, cover;
		background-repeat: no-repeat;
	}

	.hero .container>* {
		max-width: 600px;
	}

	.hero h1 {
		font-size: 52px;
	}

	.hero p {
		font-size: 19px;
	}

	.pulse {
		top: auto;
		bottom: 40px;
		height: 140px;
	}

	.blob {
		width: 520px;
		height: 520px;
	}

	.cards4 {
		grid-template-columns: repeat(4, 1fr);
	}

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

	.steps {
		grid-template-columns: repeat(4, 1fr);
	}

	.step {
		flex-direction: column;
		gap: 10px;
	}

	.faq-list {
		max-width: 820px;
	}

	.contact .container {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 64px;
		row-gap: 20px;
		align-items: start;
	}

	.contact .form {
		grid-column: 2;
		grid-row: 1 / span 4;
	}

	.footer .container {
		display: grid;
		grid-template-columns: 1.2fr 1fr 1fr;
		gap: 32px;
		align-items: start;
	}

	.copy {
		grid-column: 1/-1;
	}
}

@media (min-width: 1440px) {
	.container {
		max-width: 1280px;
	}

	.hero h1 {
		font-size: 58px;
	}
}

/* ===== Модальное окно с формой ===== */
body.modal-open {
	overflow: hidden;
}

.modal {
	width: calc(100% - 32px);
	max-width: 480px;
	max-height: calc(100dvh - 32px);
	padding: 0;
	border: 0;
	border-radius: 24px;
	background: var(--bg);
	color: var(--ink);
	overflow: auto;
	overscroll-behavior: contain;
}

.modal::backdrop {
	background: rgba(21, 23, 28, 0.6);
	backdrop-filter: blur(4px);
}

.modal[open] {
	animation: modal-in 0.25s ease;
}

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

.modal-box {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px 24px 28px;
}

.modal-box h2 {
	padding-right: 40px;
	font-size: 22px;
}

.modal-text {
	margin: 0;
	color: var(--muted);
	font-size: 15px;
}

.modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
}

.modal-close:hover {
	background: var(--line);
}

.modal .form {
	padding: 0;
	background: none;
}

@media (min-width: 768px) {
	.modal-box {
		padding: 40px 36px 36px;
	}

	.modal-box h2 {
		font-size: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.modal[open] {
		animation: none;
	}
}

/* ===== Модальное окно с тарифами ===== */

.modal-wide {
	max-width: 1080px;
}

.tariffs-hint {
	display: none;
	margin: 0;
	color: var(--muted);
	font-size: 13px;
}

.tariffs {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.plan {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 24px 20px;
	border: 1px solid var(--line);
	border-radius: 24px;
	background: var(--white);
}

.plan-label {
	color: var(--teal);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.plan h3 {
	margin-top: 4px;
	font-size: 20px;
}

.plan-price {
	margin-top: 8px;
	font-family: var(--f-head);
	font-size: 26px;
	font-weight: 500;
	letter-spacing: -0.02em;
}

.plan-price small {
	margin-left: 6px;
	color: var(--muted);
	font-family: var(--f-body);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
}

.plan .checks {
	color: var(--teal);
}

.plan .checks .ic {
	margin-top: 2px;
}

.plan .checks span {
	color: var(--ink);
}

.plan .checks small {
	display: block;
	color: var(--muted);
	font-size: 14px;
}

.plan-foot {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: auto;
}

.plan-gift {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--teal);
	border-radius: 16px;
	background: rgba(15, 107, 104, 0.08);
	color: var(--teal);
	font-size: 14px;
	font-weight: 500;
}

.plan-note {
	margin: 0;
	color: var(--muted);
	font-size: 12px;
}

@media (min-width: 768px) {
	.tariffs-hint {
		display: block;
	}

	.tariffs {
		flex-direction: row;
		margin: 0 -36px;
		padding: 4px 36px 8px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 36px;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
	}

	.plan {
		flex: 0 0 320px;
		scroll-snap-align: start;
	}
}

/* ===== Окно с пакетами: тема MedElement и примечание ===== */

.modal[data-theme="mis"] .plan-label,
.modal[data-theme="mis"] .plan .checks,
.modal[data-theme="mis"] .tariffs-note li svg {
	color: var(--accent);
}

.tariffs-note {
	padding: 20px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--white);
	font-size: 15px;
}

.tariffs-note b {
	display: block;
	margin-bottom: 12px;
	font-size: 16px;
}

.tariffs-note ul {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tariffs-note li {
	display: flex;
	gap: 10px;
	color: var(--muted);
}

.tariffs-note li svg {
	margin-top: 2px;
	color: var(--teal);
}

@media (min-width: 768px) {
	.tariffs-note ul {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px 32px;
	}
}

/* ===== Окно с тарифами MacDent (синяя тема) ===== */

.plan-meta {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
}

.plan-meta div {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.plan-meta dt {
	color: var(--muted);
	font-size: 13px;
}

.plan-meta dd {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
}

.price-opts {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
}

.price-opt {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	border: 1.5px solid var(--line2);
	border-radius: 12px;
	background: transparent;
	color: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.price-opt small {
	font-size: 13px;
	font-weight: 400;
	opacity: 0.8;
}

.price-opt[aria-pressed="true"] {
	border-color: var(--orange);
	background: rgba(255, 142, 0, 0.14);
	color: var(--orange);
}

.modal[data-theme="macdent"] {
	background: var(--blue);
	color: var(--white);
}

.modal[data-theme="macdent"] .modal-text,
.modal[data-theme="macdent"] .tariffs-hint {
	color: rgba(255, 255, 255, 0.8);
}

.modal[data-theme="macdent"] .modal-close {
	color: var(--white);
}

.modal[data-theme="macdent"] .modal-close:hover {
	background: rgba(255, 255, 255, 0.16);
}

.modal[data-theme="macdent"] .plan {
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.08);
	color: var(--white);
}

.modal[data-theme="macdent"] .plan-label,
.modal[data-theme="macdent"] .plan-meta dt,
.modal[data-theme="macdent"] .plan-price small,
.modal[data-theme="macdent"] .plan .checks small {
	color: rgba(255, 255, 255, 0.72);
}

.modal[data-theme="macdent"] .plan-price {
	color: var(--orange);
}

.modal[data-theme="macdent"] .plan .checks {
	color: var(--orange);
}

.modal[data-theme="macdent"] .plan .checks span {
	color: var(--white);
}

.modal[data-theme="macdent"] .price-opt {
	border-color: rgba(255, 255, 255, 0.35);
}

.modal[data-theme="macdent"] .price-opt[aria-pressed="true"] {
	border-color: var(--orange);
}

.modal[data-theme="macdent"] :focus-visible {
	outline-color: var(--white);
}

/* на широких экранах все три пакета помещаются, подсказка не нужна */
@media (min-width: 1112px) {
	.tariffs-hint {
		display: none;
	}
}

/* страница под открытым окном не прокручивается (в т.ч. в Safari на iPhone) */
html:has(dialog[open]) {
	overflow: hidden;
}
