/* Пункт оглавления задач на главном экране */

.hero-task__hit {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--hero-task-gap);
	width: 100%;
	padding: calc(var(--hero-task-pad-top) + 1px) var(--hero-task-pad-right) 0 0;
	border: 0;
	border-top: 1px solid var(--color-line);
	background: transparent;
	text-align: left;
}

.hero-task__hit:focus-visible {
	outline-offset: 2px;
}

.hero-task__num {
	color: var(--color-accent-muted);
	font-family: var(--font-display);
	font-size: var(--fs-task-num);
	line-height: var(--lh-task-num);
	transition: color var(--dur-fast) var(--ease);
}

.hero-task__text {
	color: var(--color-text-muted);
	font-size: var(--fs-task-text);
	line-height: var(--lh-task-text);
	transition: color var(--dur-fast) var(--ease);
}

.hero-task__progress {
	position: absolute;
	top: -2px;
	left: 0;
	display: none;
	width: var(--hero-progress-width);
	height: 2px;
	background: var(--color-accent);
}

/* Активная задача: латунная линия сверху, текст светлее */
.hero-task.is-active .hero-task__hit {
	padding-top: var(--hero-task-pad-top);
	border-top: 2px solid var(--color-accent);
}

.hero-task.is-active .hero-task__num {
	color: var(--color-accent);
}

.hero-task.is-active .hero-task__text,
.hero-task__hit:hover .hero-task__text {
	color: var(--color-text);
}

.hero-task.is-active .hero-task__progress {
	display: block;
}

/* Узкие экраны: оглавление превращается в деления слайдера, текст остаётся для скринридеров */
@media (max-width: 79.9375rem) {
	.hero-task .hero-task__hit,
	.hero-task.is-active .hero-task__hit {
		flex-direction: row;
		align-items: center;
		height: 1.25rem; /* 20 */
		padding: 0;
		border: 0;
	}

	.hero-task .hero-task__hit::before {
		content: "";
		display: block;
		flex: 1 1 auto;
		height: 3px;
		background: var(--ivory-22);
		transition: background-color var(--dur-fast) var(--ease);
	}

	.hero-task.is-active .hero-task__hit::before {
		background: var(--color-accent);
	}

	.hero-task__num,
	.hero-task__text,
	.hero-task.is-active .hero-task__progress {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	.hero-task__progress {
		display: none;
	}
}
