/* Главная jur-family.ru – редизайн 2026-11: бумага/чернила/терракота,
   системный шрифт, статика без зависимостей (перенос прототипа с Tailwind
   на ванильный CSS). Подстраницы живут на landing.css и не зависят от него */

:root {
	--paper: #F6F3EE;
	--ink: #27231E;
	--accent: #B0432B;
	--accent-dark: #933623;
	--card: #ffffff;
	--line: rgba(39, 35, 30, 0.1);
	--line-strong: rgba(39, 35, 30, 0.15);
	--muted: rgba(39, 35, 30, 0.7);
	--faint: rgba(39, 35, 30, 0.6);
	--faint-50: rgba(39, 35, 30, 0.5);
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--container: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

.hidden { display: none !important; }

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

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 1.25rem;
}

/* Кнопка-действие (единственный акцентный элемент переднего плана) */

.btn-accent {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 0.75rem;
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	padding: 1rem 1.75rem;
	box-shadow: 0 10px 15px -3px rgba(39, 35, 30, 0.18), 0 4px 6px -4px rgba(39, 35, 30, 0.12);
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-accent:hover { background: var(--accent-dark); }

.btn-accent:disabled { opacity: 0.55; cursor: default; }

/* Шапка */

.header-row {
	max-width: var(--container);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
}

.brand {
	margin-right: auto;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.025em;
}

.nav { display: flex; gap: 1.25rem; }

.nav a {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--muted);
	text-decoration: none;
}

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

.header-phone {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--accent);
	text-decoration: none;
	white-space: nowrap;
}

.header-phone:hover { text-decoration: underline; }

/* HERO: задний план – фото, средний – текст, передний – кнопка */

.hero { position: relative; }

.hero-photo {
	position: absolute;
	right: 0;
	top: 0;
	z-index: 0;
	display: none;
}

.hero-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.hero-wash { position: absolute; inset: 0; }

.hero-text {
	position: relative;
	z-index: 10;
	padding-top: 3rem;
	padding-bottom: 2.5rem;
}

.hero-eyebrow {
	font-size: 0.875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--faint);
}

.hero-title {
	margin-top: 1rem;
	max-width: 36rem;
	font-size: 1.875rem;
	font-weight: 700;
	line-height: 1.25;
}

.hero-lead {
	margin-top: 1.25rem;
	max-width: 32rem;
	font-size: 1rem;
	line-height: 1.625;
}

.hero-actions {
	margin-top: 2rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
}

/* Карточка юриста: на десктопе вылезает за нижний край hero */

.lawyer-card {
	position: relative;
	z-index: 20;
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 1rem;
	padding: 1.25rem;
	margin: 0 1.25rem 1.5rem;
}

.lawyer-avatar {
	flex: 0 0 auto;
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	border: 1px solid var(--line);
	overflow: hidden;
}

.lawyer-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 18%;
}

.lawyer-name { font-weight: 600; line-height: 1.35; }

.lawyer-bio {
	margin-top: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--muted);
}

.lawyer-stat { margin-top: 0.5rem; font-size: 0.875rem; }

.lawyer-stat b { font-weight: 700; color: var(--accent); }

/* Услуги */

.services { padding: 3rem 0 4rem; }

.section-title {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

.section-lead {
	margin-top: 0.5rem;
	max-width: 36rem;
	color: var(--muted);
}

.cards {
	margin-top: 2rem;
	display: grid;
	gap: 1rem;
}

.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 1rem;
	padding: 1.25rem;
}

.card-icon {
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line);
	border-radius: 0.5rem;
	background: var(--paper);
	color: var(--ink);
}

.card-icon svg { width: 1.5rem; height: 1.5rem; }

.card h3 {
	margin-top: 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}

.card p {
	margin-top: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--muted);
}

.card-link {
	display: inline-block;
	margin-top: 0.75rem;
	color: var(--accent);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.card-link:hover { text-decoration: underline; }

/* Проба: квиз с немедленным ответом + форма записи */

.quiz-section {
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	background: var(--card);
}

.quiz-inner {
	max-width: 48rem;
	margin: 0 auto;
	padding: 4rem 1.25rem;
}

.quiz-box { margin-top: 2rem; }

.quiz-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.quiz-step {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--faint);
}

.quiz-dots { display: flex; gap: 0.375rem; }

.quiz-dots span {
	width: 1.5rem;
	height: 0.375rem;
	border-radius: 999px;
	background: rgba(39, 35, 30, 0.15);
}

.quiz-dots span.on { background: var(--ink); }

.quiz-q {
	margin-top: 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
}

.quiz-options {
	margin-top: 1rem;
	display: grid;
	gap: 0.625rem;
}

.quiz-option {
	width: 100%;
	text-align: left;
	border: 1px solid var(--line-strong);
	border-radius: 0.5rem;
	background: var(--paper);
	color: var(--ink);
	font: inherit;
	padding: 0.75rem 1rem;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.quiz-option:hover { border-color: rgba(39, 35, 30, 0.5); }

.quiz-result { margin-top: 2rem; }

.quiz-result h3 {
	font-size: 1.125rem;
	font-weight: 600;
}

.quiz-list {
	margin-top: 1rem;
	display: grid;
	gap: 0.75rem;
}

.quiz-card {
	border: 1px solid var(--line);
	border-radius: 0.75rem;
	background: var(--paper);
	padding: 1rem;
}

.quiz-card-title { font-weight: 600; }

.quiz-card-text {
	margin-top: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--muted);
}

.quiz-note {
	margin-top: 1.25rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--muted);
}

.quiz-actions {
	margin-top: 0.75rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.quiz-next {
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
}

.quiz-next:hover { text-decoration: underline; }

.quiz-restart {
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-size: 0.875rem;
	color: var(--faint-50);
	text-decoration: underline;
	cursor: pointer;
}

.quiz-restart:hover { color: var(--ink); }

/* Форма записи */

.lead-form {
	margin-top: 3rem;
	border-top: 1px solid var(--line);
	padding-top: 2rem;
}

.lead-form h3 {
	font-size: 1.125rem;
	font-weight: 600;
}

.form-note {
	margin-top: 0.25rem;
	font-size: 0.875rem;
	color: var(--muted);
}

.form-grid {
	margin-top: 1rem;
	display: grid;
	gap: 0.75rem;
}

.field {
	display: grid;
	gap: 0.25rem;
	align-content: start;
}

.field span {
	font-size: 0.875rem;
	color: var(--muted);
}

.field input {
	width: 100%;
	border: 1px solid var(--line-strong);
	border-radius: 0.5rem;
	background: var(--paper);
	color: var(--ink);
	font: inherit;
	padding: 0.75rem 1rem;
	outline: none;
	transition: border-color 0.15s ease;
}

.field input:focus { border-color: rgba(39, 35, 30, 0.5); }

.form-submit { margin-top: 1rem; }

.consent {
	margin-top: 0.75rem;
	font-size: 0.75rem;
	color: var(--faint-50);
}

.consent a { color: var(--muted); }

.form-ok {
	margin-top: 1rem;
	font-weight: 500;
}

.form-err {
	margin-top: 1rem;
	font-weight: 500;
	color: var(--accent-dark);
}

/* Honeypot: невидим людям, видна ботам */

.hp {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	opacity: 0;
	pointer-events: none;
}

/* Футер */

.site-footer { padding: 2.5rem 0; }

.site-footer p {
	font-size: 0.875rem;
	color: var(--faint);
}

.footer-phone {
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
}

.footer-phone:hover { text-decoration: underline; }

.footer-links {
	margin-top: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
}

.footer-links a { color: var(--faint); text-decoration: none; }

.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* Адаптив: планшет и выше – фоновое фото в hero */

@media (min-width: 640px) {
	.hero-photo {
		display: block;
		width: 58%;
		height: 30rem;
	}

	.hero-wash { background: rgba(246, 243, 238, 0.45); }

	.hero-text { padding-top: 7rem; padding-bottom: 4rem; }

	.hero-title { font-size: 2.25rem; }

	.hero-lead { font-size: 1.125rem; }

	.section-title { font-size: 1.875rem; }

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

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

@media (min-width: 768px) {
	.hero-text { padding-bottom: 6rem; }

	.services { padding-top: 9rem; }

	.lawyer-card {
		position: absolute;
		right: 1.5rem;
		bottom: 0;
		margin: 0;
		max-width: 24rem;
		transform: translateY(50%);
	}
}

@media (min-width: 1024px) {
	.hero-photo {
		top: 0;
		bottom: 0;
		height: auto;
		width: 47%;
	}

	.hero-text { padding-top: 9rem; }

	.hero-title { font-size: 3rem; }

	.lawyer-card { right: 3rem; }

	.cards { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
	.hero-wash { background: rgba(246, 243, 238, 0.15); }
}

@media (max-width: 639px) {
	.header-row { flex-wrap: wrap; row-gap: 0.25rem; }

	.nav { display: none; }

	.brand { flex-basis: 100%; }
}

/* Движение по делу – и его выключение */

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

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