/**
 * Hero Main — Figma 187:58493 (1920px canvas).
 *
 * Grid @ 1920:
 * - gutter 160 | treść 753 | gap 26 | media 981
 * - treść y:233 | media y:83 h:852 | stats x:976 y:829 w:784
 * - tło: blob-hero-2.png (1143×735)
 */

.anm-hero-main {
	--anm-hm-ref-w: 1920;
	--anm-hm-max-w: 1920px;
	--anm-hm-gutter-left: 160;
	--anm-hm-content-w: 753;
	--anm-hm-media-w: 981;
	--anm-hm-col-gap: 26;
	--anm-hm-content-top: 233;
	--anm-hm-media-top: 83;
	--anm-hm-media-h: 852;
	--anm-hm-stats-w: 784;
	--anm-hm-stats-left: 32; /* 976 - 944 (lewa krawędź media) */
	--anm-hm-stats-bottom: 28; /* 935 - (829 + 78) */

	--anm-hm-headline-gradient: linear-gradient(-17.51deg, #dfdee8 49.92%, #878787 144.92%);
	--anm-hm-text-muted: #dfdee8;
	--anm-hm-text-subtle: #a7a7a7;
	--anm-hm-border: #1a1a1a;
	--anm-hm-btn-primary-text: #044f71;
	--anm-hm-btn-primary-bg-start: #8fd9fb;
	--anm-hm-btn-primary-bg-end: #b0e4fc;

	position: relative;
	z-index: 99;
	box-sizing: border-box;
	container-type: inline-size;
	width: min(var(--anm-hm-max-w), 100vw);
	max-width: var(--anm-hm-max-w);
	margin-left: calc(50% - min(var(--anm-hm-max-w), 100vw) / 2);
	margin-right: calc(50% - min(var(--anm-hm-max-w), 100vw) / 2);
	padding: 0;
	overflow-x: clip;
	overflow-y: visible;
	background-color: #000;
	color: #fff;
	border-top: 1px solid var(--anm-hm-border);
	border-bottom: 1px solid var(--anm-hm-border);
}

/* --- Tło (blob-hero-2.png) --- */
.anm-hero-main__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.anm-hero-main__bg-glow {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 50%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	object-position: top left;
	pointer-events: none;
}

.anm-hero-main__inner {
	position: relative;
	z-index: 1;
	width: 100%;
}

.anm-hero-main__layout {
	box-sizing: border-box;
	width: 100%;
}

.anm-hero-main__content {
	display: flex;
	flex-direction: column;
	gap: 2rem; /* 32px — nagłówek → body */
	min-width: 0;
}

.anm-hero-main__headline {
	margin: 0;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 5.0625rem; /* 81px */
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.03em;
	overflow: visible;
	background: var(--anm-hm-headline-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.anm-hero-main__headline.anm-rich-text p {
	margin: 0;
	font: inherit;
	letter-spacing: inherit;
	line-height: 1.1;
	overflow: visible;
	padding-block: 0.04em;
	background: inherit;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.anm-hero-main__body {
	display: flex;
	flex-direction: column;
	gap: 6rem; /* 96px */
	width: calc(648 / var(--anm-hm-content-w) * 100%);
	max-width: 40.5rem;
}

.anm-hero-main__description {
	max-width: 32rem;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 1.25rem; /* 20px */
	font-weight: 400;
	line-height: 1.4;
	color: var(--anm-hm-text-muted);
}

.anm-hero-main__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2rem; /* 32px */
}

.anm-hero-main__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.875rem; /* 62px */
	padding: 1.125rem 2rem; /* py 18 px 32 */
	border-radius: 8px;
	font-family: "IBM Plex Sans", sans-serif !important;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: normal;
	letter-spacing: 0.0125em;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.anm-hero-main__btn:hover,
.anm-hero-main__btn:focus-visible {
	opacity: 0.92;
	transform: translateY(-1px);
}

.anm-hero-main__btn--primary {
	width: auto;
	background: linear-gradient(27.94deg, var(--anm-hm-btn-primary-bg-start) 16.98%, var(--anm-hm-btn-primary-bg-end) 97.78%);
	color: var(--anm-hm-btn-primary-text);
}

.anm-hero-main__btn--secondary {
	min-width: 0;
	padding-inline: 0;
	background: transparent;
	color: var(--anm-hm-text-muted);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.anm-hero-main__stat {
	flex: 0 1 10.0625rem; /* 161px */
	min-width: 0;
}

.anm-hero-main__stat-value {
	margin: 0;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 1.5rem; /* 24px */
	font-weight: 400;
	line-height: 1.2;
	color: var(--anm-hm-text-muted);
}

.anm-hero-main__stat-label {
	margin: 0.4375rem 0 0; /* gap 7px */
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 1rem;
	font-weight: 400;
	line-height: normal;
	letter-spacing: 0.01em;
	color: var(--anm-hm-text-subtle);
}

.anm-hero-main__review {
	display: flex;
	align-items: flex-end;
	gap: 1.25rem; /* 20px */
	flex: 1 1 auto;
	min-width: 0;
}

.anm-hero-main__avatars {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.anm-hero-main__avatar {
	display: block;
	width: 3rem;
	height: 3rem;
	margin-left: -1rem;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #000;
}

.anm-hero-main__avatar:first-child {
	margin-left: 0;
}

.anm-hero-main__review-meta {
	display: flex;
	flex-direction: column;
	gap: 0.5625rem; /* 9px */
	min-width: 0;
}

.anm-hero-main__stars {
	display: block;
	width: 5rem;
	height: 1rem;
}

.anm-hero-main__review-text {
	margin: 0;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 1rem;
	font-weight: 400;
	line-height: normal;
	letter-spacing: 0.01em;
	color: var(--anm-hm-text-subtle);
}

.anm-hero-main__media {
	position: relative;
	min-width: 0;
	border-left: 1px solid var(--anm-hm-border);
}

.anm-hero-main__media::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(263.61deg, rgba(3, 3, 3, 0) 60.57%, rgb(3, 3, 3) 118.15%),
		linear-gradient(198.34deg, rgba(9, 9, 9, 0) 57.01%, rgb(3, 3, 3) 92.27%),
		linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 28%, transparent 55%);
}

.anm-hero-main__image {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

/* --- Karta wideo + stats --- */
.anm-hero-main__media-footer {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
}

.anm-hero-main__video-card {
	width: 100%;
}

.anm-hero-main__video-trigger {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	padding: 1.125rem 1.125rem 1.125rem 1.375rem;
	border: 0;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.28);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
	cursor: pointer;
}

.anm-hero-main__video-trigger:hover,
.anm-hero-main__video-trigger:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.34);
}

.anm-hero-main__video-trigger.is-preview {
	cursor: default;
}

.anm-hero-main__video-card-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.375rem;
	flex: 1;
	min-width: 0;
}

.anm-hero-main__video-card-title {
	margin: 0;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: clamp(0.9375rem, 1.1vw, 1.125rem);
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: #090909;
}

.anm-hero-main__video-card-subtitle {
	margin: 0;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.35;
	color: #6f6f6f;
}

.anm-hero-main__video-play {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	margin-top: 0.625rem;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1;
	color: #090909;
}

.anm-hero-main__video-play-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.375rem;
	height: 2.375rem;
	border-radius: 50%;
	background: #000000;
	color: #fff;
}

.anm-hero-main__video-play-icon svg {
	display: block;
	margin-left: 0.125rem;
}

.anm-hero-main__video-card-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	align-self: center;
	width: 5.25rem;
	height: 5.25rem;
	padding: 0.625rem;
	border-radius: 10px;
	background: #044f71;
	overflow: hidden;
}

.anm-hero-main__video-card-brand.has-poster {
	padding: 0;
	background: #101010;
}

.anm-hero-main__video-card-poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	pointer-events: none;
}

.anm-hero-main__video-card-poster.is-video {
	background: #101010;
}

.anm-hero-main__stats {
	position: static;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	padding: 0;
}

/* --- Desktop (≥1024px) — CSS Grid 1920 --- */
@media (min-width: 1024px) {
	.anm-hero-main__layout {
		display: grid;
		grid-template-columns:
			calc(var(--anm-hm-content-w) / var(--anm-hm-ref-w) * 100%)
			calc(var(--anm-hm-media-w) / var(--anm-hm-ref-w) * 100%);
		column-gap: calc(var(--anm-hm-col-gap) / var(--anm-hm-ref-w) * 100%);
		align-items: start;
		padding-left: calc(var(--anm-hm-gutter-left) / var(--anm-hm-ref-w) * 100%);
	}

	.anm-hero-main__content {
		grid-column: 1;
		padding-top: 90px;
		padding-bottom: calc(40 / var(--anm-hm-ref-w) * 100cqw);
	}

	.anm-hero-main__media {
		grid-column: 2;
		/* margin-top: calc(var(--anm-hm-media-top) / var(--anm-hm-ref-w) * 100cqw); */
		aspect-ratio: 981 / 852;
		height: auto;
	}

	.anm-hero-main__media-footer {
		position: absolute;
		right: auto;
		bottom: calc(var(--anm-hm-stats-bottom) / var(--anm-hm-media-h) * 100%);
		left: calc(var(--anm-hm-stats-left) / var(--anm-hm-media-w) * 100%);
		z-index: 3;
		width: calc(var(--anm-hm-stats-w) / var(--anm-hm-media-w) * 100%);
	}

	.anm-hero-main__stats {
		position: static;
		display: flex;
		align-items: flex-end;
		justify-content: space-between;
		gap: 1rem;
		width: 100%;
		padding: 0;
	}

	h1.anm-hero-main__headline.anm-rich-text {
		max-width: 650px;
	}
}

/* --- Skalowanie typografii poniżej 1920px --- */
@media (min-width: 1024px) {
	.anm-hero-main__headline {
		font-size: clamp(2.75rem, 4.22vw, 5.0625rem);
	}

	h1.anm-hero-main__headline.anm-rich-text {
		max-width: 635px;
	}
}

/* --- Tablet --- */
@media (max-width: 1023px) and (min-width: 768px) {
	.anm-hero-main {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
		padding-block: 4rem;
		padding-inline: var(--anm-section-gutter);
	}

	.anm-hero-main__layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
		padding-left: 0;
	}

	.anm-hero-main__content {
		padding-top: 0;
		padding-bottom: 0;
	}

	.anm-hero-main__body {
		width: 100%;
		max-width: none;
		gap: 3rem;
	}

	.anm-hero-main__description {
		max-width: none;
		text-align: left;
	}

	.anm-hero-main__media {
		margin-top: 0;
		min-height: clamp(18rem, 45vw, 28rem);
		aspect-ratio: auto;
	}

	.anm-hero-main__media-footer {
		position: absolute;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		padding: 1.25rem 1.5rem 1.5rem;
		box-sizing: border-box;
	}

	.anm-hero-main__stats {
		position: static;
		display: flex;
		flex-wrap: wrap;
		align-items: flex-end;
		justify-content: space-between;
		gap: 1.25rem 1.5rem;
		width: 100%;
		padding: 0;
	}

	.anm-hero-main__headline {
		font-size: clamp(2.5rem, 5vw, 4rem);
	}
}

/* --- Mobile --- */
@media (max-width: 767px) {
	.anm-hero-main {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
		padding-block: 2.5rem 0;
		padding-inline: var(--anm-section-gutter);
	}

	.anm-hero-main__bg {
		height: 40%;
	}

	.anm-hero-main__layout {
		display: flex;
		flex-direction: column;
		gap: 2rem;
		padding-left: 0;
	}

	.anm-hero-main__content {
		gap: 1.5rem;
		padding-top: 0;
		padding-bottom: 0;
	}

	.anm-hero-main__headline {
		font-size: 2.5rem;
	}

	.anm-hero-main__body {
		gap: 2rem;
		width: 100%;
		max-width: none;
	}

	.anm-hero-main__description {
		max-width: none;
	}

	.anm-hero-main__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}

	.anm-hero-main__btn {
		width: 100%;
		font-size: 1.125rem;
		white-space: normal;
	}

	.anm-hero-main__media {
		display: flex;
		flex-direction: column;
		margin-top: 0;
		margin-inline: calc(-1 * var(--anm-section-gutter));
		border-left: 0;
		border-top: 1px solid var(--anm-hm-border);
		min-height: 0;
		aspect-ratio: auto;
	}

	.anm-hero-main__media::before {
		display: none;
	}

	.anm-hero-main__image {
		display: none;
	}

	.anm-hero-main__media-footer {
		position: static;
		gap: 1.5rem;
		padding: 1.5rem var(--anm-section-gutter) 2rem;
		box-sizing: border-box;
	}

	.anm-hero-main__stats {
		position: static;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2rem;
		width: 100%;
		padding: 0;
	}

	.anm-hero-main__stat {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 0.4375rem;
		flex: none;
		min-width: 0;
		max-width: 100%;
	}

	.anm-hero-main__stat-value {
		flex-shrink: 0;
		margin: 0;
		font-size: 1.5rem;
		line-height: 1.2;
		white-space: nowrap;
	}

	.anm-hero-main__stat-label {
		margin: 0;
		flex: none;
		min-width: 0;
		font-size: 1rem;
		text-align: left;
	}

	.anm-hero-main__review {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 1.25rem;
		flex: none;
		width: auto;
	}

	.anm-hero-main__review-meta {
		align-items: flex-start;
		gap: 0.5625rem;
	}
}

/* --- Modal wideo MP4 --- */
html.anm-video-modal-open {
	overflow: hidden;
}

.anm-hero-main__video-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: clamp(1rem, 4vw, 2rem);
	box-sizing: border-box;
	pointer-events: none;
}

.anm-hero-main__video-modal[hidden] {
	display: none;
}

.anm-hero-main__video-modal-backdrop {
	position: absolute;
	inset: 0;
	padding: 0;
	border: 0;
	margin: 0;
	background: rgba(0, 0, 0, 0.92);
	cursor: pointer;
	pointer-events: auto;
}

.anm-hero-main__video-modal-dialog {
	position: relative;
	z-index: 1;
	display: block;
	width: min(92vw, 26rem);
	max-width: min(92vw, 26rem);
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent !important;
	box-shadow: none;
	pointer-events: auto;
}

.anm-hero-main__video-modal-player {
	display: block;
	width: min(92vw, 26rem) !important;
	max-width: min(92vw, 26rem) !important;
	height: auto !important;
	max-height: min(88vh, 900px) !important;
	margin: 0;
	padding: 0;
	border: 0;
	background: #000 !important;
	object-fit: contain;
	object-position: center center;
	border-radius: 8px;
	box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
	vertical-align: top;
}

.anm-hero-main__video-modal-close {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 1000000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.96) !important;
	box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.45);
	font-family: "IBM Plex Sans", sans-serif !important;
	font-size: 2rem;
	font-weight: 400;
	line-height: 1;
	color: #044f71 !important;
	cursor: pointer;
	pointer-events: auto;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.anm-hero-main__video-modal-close:hover,
.anm-hero-main__video-modal-close:focus-visible {
	transform: scale(1.05);
	background: #fff !important;
	outline: none;
	color: #044f71 !important;
}

.anm-hero-main__video-modal-close span {
	display: block;
	margin-top: -0.125rem;
}

@media (max-width: 767px) {
	.anm-hero-main__video-modal-dialog,
	.anm-hero-main__video-modal-player {
		width: min(94vw, 22rem) !important;
		max-width: min(94vw, 22rem) !important;
	}

	.anm-hero-main__video-modal-close {
		top: 0.875rem;
		right: 0.875rem;
		width: 2.75rem;
		height: 2.75rem;
		font-size: 1.75rem;
	}
}
