/* =========================================================
   Первый экран лендинга Нейро Фина — с формой заявки
   Все классы с префиксом nfh-, чтобы не пересекаться с css/styles.css
   ========================================================= */

.nfh {
	position: relative;
	font-family: 'Golos Text', sans-serif;
	color: #fff;
}

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

.nfh [hidden] {
	display: none !important;
}

/* ---------- темная часть экрана ---------- */
.nfh-top {
	position: relative;
	overflow: hidden;
	padding-bottom: 110px;
	background-color: #202020;
}

.nfh-top::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 80% 44%, rgba(179, 51, 135, .50) 0%, rgba(144, 77, 153, .24) 26%, rgba(144, 77, 153, 0) 52%),
		radial-gradient(ellipse 50% 60% at 0% 0%, rgba(179, 106, 246, .10) 0%, rgba(179, 106, 246, 0) 70%);
}

.nfh-wrap {
	position: relative;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- текст слева ---------- */
.nfh-copy {
	position: relative;
	z-index: 2;
	max-width: 600px;
	min-height: 446px;
	padding-top: 24px;
}

.nfh-logo {
	display: block;
	width: 260px;
	height: auto;
}

.nfh-title {
	margin: 38px 0 0;
	padding: 0;
	font-family: 'Geologica', sans-serif;
	font-size: 48px;
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.02em;
	color: #fff;
}

.nfh-hl {
	color: #FFC6EB;
	background: linear-gradient(90deg, #FFD0EE, #FFBCE8);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.nfh-lead {
	max-width: 550px;
	margin: 22px 0 0;
	font-size: 19px;
	font-weight: 400;
	line-height: 1.45;
	color: rgba(255, 255, 255, .8);
}

/* ---------- Нейро Фин и вопросы к нему ---------- */
.nfh-stage {
	position: absolute;
	z-index: 1;
	top: 0;
	right: clamp(-150px, calc((1180px - 100vw) / 2 + 10px), 10px);
	width: 720px;
	height: 470px;
	transform-origin: right top;
}

.nfh-figure {
	position: absolute;
	left: 197px;
	top: 108px;
	width: 568px;
}

.nfh-figure-in {
	position: relative;
	width: 100%;
	aspect-ratio: 946 / 1039;
}

/* оранжевое свечение за шаром */
.nfh-figure-in::before {
	content: '';
	position: absolute;
	left: -14.7%;
	top: 4.9%;
	width: 55.8%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(254, 129, 46, .36) 0%, rgba(254, 129, 46, .12) 40%, rgba(254, 129, 46, 0) 68%);
}

.nfh-fin {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
}

.nfh-q {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px 12px 12px;
	border: 1.5px solid rgba(214, 170, 240, .45);
	border-radius: 14px;
	background: rgba(48, 40, 52, .62);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
	font-size: 14.5px;
	font-weight: 400;
	line-height: 1.35;
	color: rgba(255, 255, 255, .9);
}

.nfh-q b {
	font-weight: 600;
	color: #fff;
}

.nfh-q-ic {
	display: flex;
	flex: 0 0 32px;
	align-items: center;
	justify-content: center;
	height: 32px;
	border: 1.5px solid rgba(255, 255, 255, .55);
	border-radius: 10px;
}

.nfh-q-ic svg {
	display: block;
}

.nfh-q1 { left: 60px;  top: 62px;  width: 240px; }
.nfh-q2 { left: 462px; top: 16px;  width: 240px; }
.nfh-q3 { left: -42px; top: 226px; width: 222px; }
.nfh-q4 { left: 486px; top: 368px; width: 238px; }

/* ---------- форма заявки ---------- */
.nfh-formwrap {
	position: relative;
	z-index: 3;
	max-width: 1180px;
	margin: -100px auto 0;
	padding: 0 20px;
}

.nfh-card {
	padding: 26px 40px 18px;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
	color: #171717;
}

.nfh-form {
	margin: 0;
}

.nfh-form-title {
	margin: 0;
	text-align: center;
	font-family: 'Geologica', sans-serif;
	font-size: 28px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: #171717;
}

.nfh-form-sub {
	margin-top: 6px;
	text-align: center;
	font-size: 16px;
	line-height: 1.4;
	color: #5a5a5a;
}

.nfh-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 18px;
}

.nfh-field {
	flex: 1 1 0;
	min-width: 0;
}

.nfh-input {
	display: block;
	width: 100%;
	height: 58px;
	margin: 0;
	padding: 0 20px;
	border: 1px solid #cfc8d6;
	border-radius: 14px;
	background: #fff;
	font-family: 'Golos Text', sans-serif;
	font-size: 17px;
	color: #171717;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.nfh-input::placeholder {
	color: #8b8592;
}

.nfh-input:focus {
	border-color: #B36AF6;
	box-shadow: 0 0 0 3px rgba(179, 106, 246, .18);
}

.nfh-input[aria-invalid="true"] {
	border-color: #e63a24;
}

.nfh-err {
	margin-top: 5px;
	font-size: 12px;
	line-height: 1.2;
	color: #e63a24;
}

.nfh-btn {
	flex: 0 0 250px;
	height: 58px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(90deg, #B36AF6, #B33387);
	box-shadow: 0 10px 24px rgba(179, 51, 135, .32);
	font-family: 'Golos Text', sans-serif;
	font-size: 18px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	transition: filter .2s ease, opacity .2s ease;
}

.nfh-btn:hover {
	filter: brightness(1.08);
}

.nfh-btn:disabled {
	opacity: .6;
	cursor: default;
}

.nfh-agree {
	display: flex;
	justify-content: flex-end;
	align-items: flex-start;
	gap: 8px;
	margin-top: 12px;
	font-size: 12px;
	line-height: 1.35;
	color: #8b8592;
	cursor: pointer;
}

.nfh-agree input {
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	margin: 1px 0 0;
	accent-color: #8b8592;
}

.nfh-agree a {
	color: #6b6b6b;
	text-decoration: underline;
}

.nfh-agree-err {
	text-align: right;
}

.nfh-submit-err {
	margin-top: 8px;
	text-align: center;
	font-size: 14px;
	color: #e63a24;
}

.nfh-done {
	padding: 10px 0 8px;
	text-align: center;
}

.nfh-done-title {
	font-family: 'Geologica', sans-serif;
	font-size: 28px;
	font-weight: 500;
	color: #171717;
}

.nfh-done p {
	margin: 8px 0 0;
	font-size: 16px;
	line-height: 1.4;
	color: #5a5a5a;
}

.nfh-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- ноутбуки (1366×768 и похожие) и невысокие окна ---------- */
@media (max-width: 1400px), (max-height: 800px) {
	.nfh-top { padding-bottom: 96px; }
	.nfh-stage { transform: scale(.86); }
	.nfh-copy { min-height: 392px; padding-top: 18px; }
	.nfh-logo { width: 220px; }
	.nfh-title { margin-top: 26px; font-size: 42px; }
	.nfh-lead { margin-top: 16px; max-width: 500px; font-size: 17px; }
	.nfh-formwrap { margin-top: -92px; }
	.nfh-card { padding: 20px 34px 14px; }
	.nfh-form-title, .nfh-done-title { font-size: 24px; }
	.nfh-form-sub { margin-top: 4px; font-size: 15px; }
	.nfh-row { margin-top: 14px; }
	.nfh-input, .nfh-btn { height: 52px; }
	.nfh-agree { margin-top: 8px; }
}

/* ---------- небольшие ноутбуки ---------- */
@media (max-width: 1199px) and (min-width: 901px) {
	.nfh-stage { transform: scale(.7); }
	.nfh-copy { max-width: 470px; min-height: 340px; }
	.nfh-title { font-size: 36px; }
	.nfh-lead { max-width: 440px; font-size: 16px; }
	.nfh-btn { flex-basis: 210px; font-size: 16px; }
	.nfh-input { padding: 0 14px; font-size: 15px; }
}

/* ---------- телефоны и планшеты: текст → форма → Нейро Фин с вопросами ---------- */
@media (max-width: 900px) {
	.nfh {
		display: flex;
		flex-direction: column;
		overflow: hidden;
		padding: 0 16px 6px;
		background-color: #202020;
		background-image: radial-gradient(circle at 70% 78%, rgba(179, 51, 135, .38) 0%, rgba(144, 77, 153, 0) 55%);
	}

	.nfh-top,
	.nfh-wrap {
		display: contents;
	}

	.nfh-top::before {
		content: none;
	}

	.nfh-copy {
		order: 1;
		max-width: none;
		min-height: 0;
		padding-top: 22px;
	}

	.nfh-logo { width: 200px; }
	.nfh-title { margin-top: 24px; font-size: 34px; }
	.nfh-lead { margin-top: 12px; max-width: none; font-size: 15.5px; }

	.nfh-formwrap {
		order: 2;
		width: 100%;
		max-width: 560px;
		margin: 20px auto 0;
		padding: 0;
	}

	.nfh-card { padding: 20px 16px 16px; border-radius: 20px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
	.nfh-form-title, .nfh-done-title { font-size: 21px; }
	.nfh-form-sub { font-size: 14px; }
	.nfh-row { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 14px; }
	.nfh-field { flex: none; }
	.nfh-input { height: 50px; }
	.nfh-btn { flex: none; width: 100%; height: 52px; }
	.nfh-agree { justify-content: flex-start; }
	.nfh-agree-err { text-align: left; }

	.nfh-stage {
		order: 3;
		position: relative;
		top: auto;
		right: auto;
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-areas: "a b" "f f" "c d";
		gap: 8px;
		width: 100%;
		max-width: 560px;
		height: auto;
		margin: 0 auto;
		padding: 22px 0 26px;
		transform: none;
	}

	.nfh-figure {
		grid-area: f;
		position: relative;
		left: auto;
		top: auto;
		width: auto;
		height: 260px;
		margin: 0 -16px;
	}

	.nfh-figure-in {
		position: absolute;
		left: calc(50% - 151px);
		top: 4px;
		width: 378px;
	}

	.nfh-q {
		position: static;
		width: auto;
		gap: 8px;
		padding: 10px;
		border-radius: 12px;
		font-size: 12.5px;
	}

	.nfh-q1 { grid-area: a; }
	.nfh-q2 { grid-area: b; }
	.nfh-q3 { grid-area: c; }
	.nfh-q4 { grid-area: d; }

	.nfh-q-ic { flex-basis: 24px; height: 24px; border-radius: 7px; }
	.nfh-q-ic svg { width: 12px; height: 12px; }
}

.nfh-btn:focus-visible, .nfh-agree input:focus-visible, .nfh-agree a:focus-visible {
	outline: 3px solid #B33387;
	outline-offset: 3px;
}
.nfh-btn:active:not(:disabled) { filter: brightness(.92); }
.nfh-agree { color: #625b69; }
@media (prefers-reduced-motion: reduce) {
	.nfh-input, .nfh-btn { transition: none; }
}
