/**
 * DnesTepujem redesign foundational components.
 *
 * Phase 01:
 * - typography
 * - buttons
 * - badges
 * - base cards
 * - section headings
 */

/* ==========================================================================
   Accessibility
   ========================================================================== */

.dt-redesign-preview .dt-skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 10000;
	padding: 10px 16px;
	border-radius: var(--dt-radius-pill);
	background: var(--dt-color-text-primary);
	color: var(--dt-color-surface);
	font-weight: 700;
	text-decoration: none;
	transform: translateY(-160%);
	transition: transform var(--dt-transition-fast);
}

.dt-redesign-preview .dt-skip-link:focus {
	transform: translateY(0);
}

/* ==========================================================================
   Typography
   ========================================================================== */

.dt-redesign-preview .dt-heading-xl {
	font-size: clamp(2.75rem, 6vw, 5.5rem);
	font-weight: 700;
	line-height: 0.98;
	letter-spacing: -0.04em;
}

.dt-redesign-preview .dt-heading-lg {
	font-size: clamp(2.1rem, 4vw, 3.75rem);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.035em;
}

.dt-redesign-preview .dt-heading-md {
	font-size: clamp(1.6rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.025em;
}

.dt-redesign-preview .dt-heading-sm {
	font-size: clamp(1.2rem, 2vw, 1.5rem);
	font-weight: 700;
	line-height: 1.2;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.dt-redesign-preview .dt-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 1px solid transparent;
	border-radius: var(--dt-radius-pill);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color var(--dt-transition-fast),
		border-color var(--dt-transition-fast),
		color var(--dt-transition-fast),
		transform var(--dt-transition-fast);
}

.dt-redesign-preview .dt-button--primary {
	background: var(--dt-color-accent);
	color: var(--dt-color-text-primary);
}

.dt-redesign-preview .dt-button--secondary {
	background: var(--dt-color-surface);
	border-color: var(--dt-color-border);
	color: var(--dt-color-text-primary);
}

.dt-redesign-preview .dt-button:hover {
	transform: translateY(-1px);
}

.dt-redesign-preview .dt-button:focus-visible {
	outline: 3px solid var(--dt-color-text-primary);
	outline-offset: 3px;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.dt-redesign-preview .dt-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 6px 12px;
	border-radius: var(--dt-radius-pill);
	background: var(--dt-color-surface);
	color: var(--dt-color-text-primary);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
}

.dt-redesign-preview .dt-badge--yellow {
	background: var(--dt-color-accent);
}

.dt-redesign-preview .dt-badge--mint {
	background: var(--dt-color-accent-secondary);
}

.dt-redesign-preview .dt-badge--neutral {
	border: 1px solid var(--dt-color-border);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.dt-redesign-preview .dt-card {
	padding: var(--dt-space-lg);
	border: 1px solid var(--dt-color-border);
	border-radius: var(--dt-radius-lg);
	background: var(--dt-color-surface);
	box-shadow: var(--dt-shadow-sm);
}

/* ==========================================================================
   Section heading
   ========================================================================== */

.dt-redesign-preview .dt-section-heading {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--dt-space-xs);
	max-width: var(--dt-container-content);
}

.dt-redesign-preview .dt-section-heading h1,
.dt-redesign-preview .dt-section-heading h2,
.dt-redesign-preview .dt-section-heading h3,
.dt-redesign-preview .dt-section-heading p {
	margin-bottom: 0;
}

.dt-redesign-preview .dt-section-heading p {
	max-width: 62ch;
	font-size: 1.0625rem;
}

.dt-redesign-preview .dt-home-section-kicker {
	display: inline-block;
	color: var(--dt-color-text-secondary);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.dt-redesign-preview .dt-section-heading--centered {
	align-items: center;
	margin-inline: auto;
	text-align: center;
}

/* ==========================================================================
   Canonical four-step process
   ========================================================================== */

.dt-redesign-preview .dt-home-process {
	background: var(--dt-color-background);
}

.dt-redesign-preview .dt-home-process .dt-container {
	position: relative;
}

.dt-redesign-preview .dt-home-process .dt-section-heading {
	position: relative;
	z-index: 1;
	margin-bottom: clamp(68px, 7vw, 96px);
}

.dt-redesign-preview .dt-home-process__mascot {
	position: absolute;
	top: -50px;
	right: -20px;
	z-index: 0;
	display: block;
	width: clamp(235px, 20vw, 290px);
	max-height: 194px;
	object-fit: contain;
	object-position: right top;
	pointer-events: none;
	user-select: none;
	animation: dt-home-process-mascot-hover 3.6s ease-in-out infinite;
	transform-origin: center;
	will-change: transform;
}

@keyframes dt-home-process-mascot-hover {
	0%,
	100% {
		transform: translate3d(0, 0, 0) rotate(-0.4deg);
	}

	50% {
		transform: translate3d(-4px, -14px, 0) rotate(0.65deg);
	}
}

.dt-redesign-preview .dt-home-process__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(24px, 3vw, 44px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.dt-redesign-preview .dt-home-process__step {
	position: relative;
	text-align: center;
}

.dt-redesign-preview .dt-home-process__step:not(:last-child)::after {
	position: absolute;
	top: 59px;
	left: calc(50% + 76px);
	width: calc(100% - 118px);
	height: 1px;
	background: var(--dt-color-border);
	content: "";
}

.dt-redesign-preview .dt-home-process__number {
	display: inline-flex;
	width: 118px;
	height: 118px;
	align-items: center;
	justify-content: center;
	margin-bottom: 30px;
	border: 3px solid var(--dt-color-accent);
	border-radius: 50%;
	background: var(--dt-color-surface);
	font-size: 1.55rem;
	font-weight: 800;
}

.dt-redesign-preview .dt-home-process__step:last-child .dt-home-process__number {
	border-color: var(--dt-color-accent);
	background: var(--dt-color-accent);
}

.dt-redesign-preview .dt-home-process__step h3 {
	max-width: 18ch;
	margin: 0 auto 8px;
}

.dt-redesign-preview .dt-home-process__step p {
	max-width: 27ch;
	margin: 0 auto;
	font-size: 0.94rem;
	line-height: 1.65;
}

.dt-redesign-preview .dt-home-process.dt-home-process--animate .dt-home-process__step {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 500ms ease, transform 500ms ease;
	transition-delay: calc(var(--dt-step-index) * 130ms);
}

.dt-redesign-preview .dt-home-process.dt-home-process--animate.dt-home-process--visible .dt-home-process__step {
	opacity: 1;
	transform: none;
}

.dt-redesign-preview .dt-home-process.dt-home-process--animate .dt-home-process__step:not(:last-child)::after {
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 450ms ease;
	transition-delay: calc(230ms + var(--dt-step-index) * 130ms);
}

.dt-redesign-preview .dt-home-process.dt-home-process--animate.dt-home-process--visible .dt-home-process__step:not(:last-child)::after {
	transform: scaleX(1);
}

.dt-redesign-preview .dt-home-process.dt-home-process--animate .dt-home-process__number {
	transition: background-color 300ms ease;
	transition-delay: calc(160ms + var(--dt-step-index) * 130ms);
}

.dt-redesign-preview .dt-home-process.dt-home-process--animate.dt-home-process--visible .dt-home-process__number {
	background: #fff5bb;
}

.dt-redesign-preview .dt-home-process.dt-home-process--animate.dt-home-process--visible .dt-home-process__step:last-child .dt-home-process__number {
	background: var(--dt-color-accent);
}

@media (hover: hover) {
	.dt-redesign-preview .dt-home-process__step:hover .dt-home-process__number {
		box-shadow: 0 8px 22px rgba(24, 24, 24, 0.1);
	}
}

@media (max-width: 900px) {
	.dt-redesign-preview .dt-home-process.dt-home-process--animate .dt-home-process__step {
		transition-delay: 0ms;
	}

	.dt-redesign-preview .dt-home-process__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.dt-redesign-preview .dt-home-process__mascot {
		top: -30px;
		right: -4px;
		width: 184px;
		max-height: 124px;
	}

	.dt-redesign-preview .dt-home-process__step:not(:last-child)::after {
		display: none;
	}
}

@media (max-width: 700px) {
	.dt-redesign-preview .dt-home-process .dt-container {
		display: flex;
		flex-direction: column;
	}

	.dt-redesign-preview .dt-home-process .dt-section-heading {
		order: 1;
	}

	.dt-redesign-preview .dt-home-process__list {
		order: 2;
	}

	.dt-redesign-preview .dt-home-process__mascot {
		order: 3;
		position: relative;
		inset: auto;
		display: block;
		align-self: flex-end;
		width: min(34vw, 128px);
		max-height: 86px;
		margin: 8px 8px -44px auto;
		object-position: right center;
	}

	.dt-redesign-preview .dt-home-process__list {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dt-redesign-preview .dt-home-process__mascot {
		animation: none;
		transform: none;
		will-change: auto;
	}

	.dt-redesign-preview .dt-home-process.dt-home-process--animate .dt-home-process__step {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.dt-redesign-preview .dt-home-process.dt-home-process--animate .dt-home-process__step::after {
		transform: none;
		transition: none;
	}

	.dt-redesign-preview .dt-button {
		transition: none;
	}

	.dt-redesign-preview .dt-button:hover {
		transform: none;
	}
}

/* ==========================================================================
   Canonical FAQ accordion
   ========================================================================== */

.dt-redesign-preview .dt-faq-accordion {
	display: grid;
	gap: 18px;
}

.dt-redesign-preview .dt-faq-card {
	overflow: hidden;
	border: 1px solid color-mix(in srgb, var(--dt-color-surface) 32%, transparent);
	border-radius: 26px;
	background: var(--dt-color-text-primary);
	box-shadow:
		inset 0 1px 0 color-mix(in srgb, var(--dt-color-surface) 13%, transparent),
		0 16px 36px rgba(24, 24, 24, 0.15);
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.dt-redesign-preview .dt-faq-card:is([open], :has(.dt-faq-card__question[aria-expanded="true"])) {
	border-color: color-mix(in srgb, var(--dt-color-accent) 54%, var(--dt-color-surface) 18%);
	box-shadow:
		inset 0 1px 0 color-mix(in srgb, var(--dt-color-surface) 18%, transparent),
		0 18px 40px rgba(24, 24, 24, 0.18);
}

.dt-redesign-preview .dt-faq-card__question {
	display: grid;
	width: 100%;
	min-height: 98px;
	grid-template-columns: minmax(0, 1fr) 42px;
	align-items: center;
	gap: var(--dt-space-md);
	padding: 32px 36px;
	border: 0;
	background: transparent;
	color: var(--dt-color-surface);
	font: inherit;
	font-size: clamp(1.2rem, 2vw, 1.55rem);
	font-weight: 750;
	line-height: 1.4;
	text-align: left;
	list-style: none;
	cursor: pointer;
}

.dt-redesign-preview .dt-faq-card:is([open], :has(.dt-faq-card__question[aria-expanded="true"])) .dt-faq-card__question {
	padding-bottom: 28px;
}

.dt-redesign-preview .dt-faq-card__question:focus-visible {
	position: relative;
	z-index: 1;
	border-radius: 24px;
	outline: 3px solid var(--dt-color-accent);
	outline-offset: -4px;
}

.dt-redesign-preview .dt-faq-card__question::-webkit-details-marker {
	display: none;
}

.dt-redesign-preview .dt-faq-card__icon {
	position: relative;
	display: block;
	width: 42px;
	height: 42px;
	justify-self: end;
	border-radius: 50%;
	background: var(--dt-color-accent);
	color: var(--dt-color-text-primary);
	transform: rotate(0deg);
	transition: transform var(--dt-transition-fast);
}

.dt-redesign-preview .dt-faq-card__icon::before,
.dt-redesign-preview .dt-faq-card__icon::after {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 3px;
	border-radius: var(--dt-radius-pill);
	background: currentColor;
	content: "";
	transform: translate(-50%, -50%);
}

.dt-redesign-preview .dt-faq-card__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.dt-redesign-preview .dt-faq-card[open] .dt-faq-card__icon,
.dt-redesign-preview .dt-faq-card__question[aria-expanded="true"] .dt-faq-card__icon {
	transform: rotate(45deg);
}

.dt-redesign-preview .dt-faq-card__answer {
	max-width: none;
	margin: 0;
	padding: 26px 36px 32px;
	border-top: 1px solid color-mix(in srgb, var(--dt-color-accent) 28%, transparent);
	border-radius: 0 0 25px 25px;
	background: color-mix(in srgb, var(--dt-color-surface) 5%, transparent);
	color: color-mix(in srgb, var(--dt-color-surface) 72%, transparent);
	font-size: 1rem;
	line-height: 1.7;
}

.dt-redesign-preview .dt-faq-card__answer > :first-child {
	margin-top: 0;
}

.dt-redesign-preview .dt-faq-card__answer > :last-child {
	margin-bottom: 0;
}

.dt-redesign-preview .dt-faq-card__answer p,
.dt-redesign-preview .dt-faq-card__answer ul {
	max-width: 68ch;
	color: inherit;
	font: inherit;
}

.dt-redesign-preview .dt-faq-card__answer ul {
	display: grid;
	gap: 8px;
	padding-left: 1.35em;
}

.dt-redesign-preview .dt-faq-card__answer li::marker {
	color: var(--dt-color-accent);
}

@media (max-width: 700px) {
	.dt-redesign-preview .dt-faq-accordion {
		gap: 12px;
	}

	.dt-redesign-preview .dt-faq-card__question {
		min-height: 90px;
		grid-template-columns: minmax(0, 1fr) 42px;
		padding: 24px 20px;
		font-size: 1rem;
	}

	.dt-redesign-preview .dt-faq-card__question:focus-visible {
		border-radius: 22px;
	}

	.dt-redesign-preview .dt-faq-card__answer {
		padding: 22px 20px 26px;
		font-size: 0.96rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dt-redesign-preview .dt-faq-card,
	.dt-redesign-preview .dt-faq-card__icon {
		transition: none;
	}
}
