/*
 * Home (Native Blocks) — template page-home-native, patterns home-native-*.
 *
 * The sections reuse the PureLabs class names already styled in purelabs.css (section, hero, protect-card,
 * eco-card, stat, filter, footer-*…). This file only adds what core-block markup needs on top of that:
 * image <figure> wrappers, core buttons / navigation / social links, and the carousel + compare toggle
 * that home-native.js drives. The original html-block homepage is untouched.
 */

/* ---------- Block plumbing ---------- */
.hn-page .wp-block-image,
.hn-navbar .wp-block-image,
.hn-footer .wp-block-image {
	margin: 0;
}

/* Decorative <figure> that fills its (positioned) parent; the figure carries the object-fit/position. */
.hn-fill img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: inherit;
	object-position: inherit;
}

.hn-page .wp-block-buttons {
	margin: 0;
}

/* ---------- Header (template part header-native) ---------- */
.hn-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 5;
}

.hn-navbar {
	position: relative;
	z-index: 5;
	box-sizing: border-box;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	height: 80px;
	margin: 0 20px;
	padding: 0 20px;
	background: rgba(20, 20, 26, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 20px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

/* The blur lives on a pseudo-element: backdrop-filter on the navbar itself would become the containing
   block of the fixed-position mobile menu overlay and trap it inside the 70px bar. */
.hn-navbar::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	pointer-events: none;
	-webkit-backdrop-filter: blur(24px) saturate(140%);
	backdrop-filter: blur(24px) saturate(140%);
}

@media (min-width: 1240px) {
	.hn-navbar {
		margin-left: auto;
		margin-right: auto;
	}
}

.navbar__word img {
	width: auto;
	height: 22px;
}

@media (max-width: 900px) {
	.navbar__word img {
		height: 18px;
	}
}

.navbar__word a {
	display: block;
	line-height: 0;
}

.hn-nav {
	font-size: 1rem;
	text-transform: uppercase;
}

.hn-nav .wp-block-navigation__container {
	gap: 0;
}

.hn-nav .wp-block-navigation-item {
	align-items: center;
}

/* Open mobile menu (core overlay): plain stacked links, no separator dots. */
.hn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item::before {
	display: none;
}

.hn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
	gap: 24px;
}

.hn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.25rem;
}

/* Dot separator between links. */
.hn-nav .wp-block-navigation-item + .wp-block-navigation-item::before {
	content: "";
	width: 6px;
	height: 6px;
	margin: 0 20px;
	background: url("../images/patterns/dot.svg") center / contain no-repeat;
}

.hn-nav-cta {
	margin: 0;
}

.hn-btn-pill .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 20px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(82deg, rgba(74, 31, 176, 0.66) 15.778%, rgba(195, 110, 139, 0.66) 102.06%), #fff;
	color: #000;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

/* ---------- Hero ---------- */
/* The navbar overlays the hero; leave its 80px bar height above the content. */
.hn-hero {
	padding-top: 80px;
}

.hn-hero .hero__title {
	white-space: nowrap;
}

.hn-cta {
	justify-content: center;
}

.hn-btn-outline .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 20px 8px 8px;
	border: 1px solid var(--pink);
	border-radius: 140px;
	background: transparent;
	color: #fff;
	font-family: inherit;
	font-size: 20px;
	font-weight: 500;
	line-height: normal;
	text-decoration: none;
}

.hn-btn-outline .wp-block-button__link::before {
	content: "";
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 24px;
	background: var(--pink) url("../images/patterns/play-icon.svg") center / 20px no-repeat;
	box-shadow: 0 0 30px #5f3543;
}

/* ---------- Headings that keep the design's two-line break on desktop ---------- */
.hn-lines {
	white-space: nowrap;
}

/* ---------- Compare (Same task) ---------- */
.hn-tabs {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 10px 30px 10px 10px;
	border: 1px solid var(--border);
	border-radius: 60px;
}

.hn-tab .wp-block-button__link {
	padding: 15px 20px;
	border: 0;
	border-radius: 60px;
	background: none;
	color: var(--ice);
	font-family: var(--font);
	font-size: 20px;
	font-weight: 500;
	cursor: pointer;
}

.hn-tab--active .wp-block-button__link {
	background: var(--pink);
}

.compare__arrow img {
	display: block;
	width: 100%;
	height: auto;
}

.prompt-card hr.hn-rule.wp-block-separator {
	width: 100%;
	height: 0;
	background: none;
	opacity: 1;
}

.hn-run {
	justify-content: center;
}

.hn-btn-gradient .wp-block-button__link {
	padding: 20px 48px;
	border: 1.5px solid var(--purple);
	border-radius: 60px;
	background: transparent linear-gradient(76deg, rgba(74, 31, 176, 0.66) 4%, rgba(195, 110, 139, 0.66) 99%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	cursor: pointer;
}

/* ---------- Ecosystem ---------- */
.hn-page .eco-card__icon {
	margin-bottom: 12px;
}

.hn-page .eco-card__icon--analytics {
	margin: 0;
}

/* Skeleton placeholder widths (replace the old inline styles). */
.sk-a { width: 100%; }
.sk-b { width: 80%; opacity: 0.6; }
.sk-c { width: 55%; opacity: 0.3; }
.sk-d { width: 53%; opacity: 0.5; }
.sk-e { width: 30%; opacity: 0.5; }

.eco-card--prefs .skeleton-line {
	height: 12px;
}

/* ---------- Experiments carousel (Figma 1201 × 673) ---------- */
.hn-carousel {
	--slide-w: 793px;
	--slide-h: 394px;
	--slide-gap: 20px;
	position: relative;
	width: 100%;
	max-width: 1201px;
	margin-inline: auto;
}

.hn-carousel__viewport {
	overflow: hidden;
	width: 100%;
	height: var(--slide-h);
}

.hn-carousel__track {
	display: flex;
	align-items: stretch;
	gap: var(--slide-gap);
	will-change: transform;
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hn-carousel.is-dragging .hn-carousel__track {
	transition: none;
}

.hn-carousel__slide {
	position: relative;
	flex: 0 0 var(--slide-w);
	width: var(--slide-w);
	height: var(--slide-h);
	border: 2px solid #fff;
	border-radius: 20px;
	overflow: hidden;
	background: #000;
	color: inherit;
	cursor: pointer;
	transition: box-shadow 0.45s ease;
}

.hn-carousel__slide.is-active {
	z-index: 2;
	cursor: default;
	box-shadow: 0 0 0 1px rgba(195, 110, 139, 0.2);
}

.hn-carousel__slide:focus-visible {
	outline: 2px solid var(--ice);
	outline-offset: 4px;
}

.hn-carousel__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.9;
	pointer-events: none;
	user-select: none;
}

.hn-carousel__bg--sentinel { object-position: 70% center; }
.hn-carousel__bg--paio { object-position: left 30%; }
.hn-carousel__bg--anchor { object-position: center top; }

.hn-carousel__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(75deg, rgba(14, 12, 21, 0.97) 0%, rgba(14, 12, 21, 0.82) 32%, rgba(14, 12, 21, 0.35) 58%, rgba(14, 12, 21, 0.08) 78%, transparent 100%),
		linear-gradient(180deg, transparent 42%, rgba(14, 12, 21, 0.55) 100%);
}

.hn-carousel__logo {
	position: absolute;
	bottom: 40px;
	z-index: 2;
	width: 48px;
	height: 60px;
	object-fit: contain;
	pointer-events: none;
	user-select: none;
	transition: left 0.45s ease, right 0.45s ease, top 0.45s ease, bottom 0.45s ease, opacity 0.35s ease;
}

.hn-carousel__logo--paio { width: 60px; }
.hn-carousel__logo--anchor { width: 49px; }

.hn-carousel__slide.is-prev .hn-carousel__logo {
	left: auto;
	right: 68px;
}

.hn-carousel__slide.is-next .hn-carousel__logo {
	left: 62px;
	right: auto;
}

.hn-carousel__slide.is-active .hn-carousel__logo {
	top: 150px;
	bottom: auto;
	left: 38px;
	right: auto;
}

.hn-carousel__caption {
	position: absolute;
	top: 222px;
	left: 38px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 440px;
	max-width: calc(100% - 76px);
	padding: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease 0.05s;
}

.hn-carousel__slide.is-active .hn-carousel__caption {
	opacity: 1;
}

.hn-carousel__copy {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.hn-carousel__caption h3 {
	margin: 0;
	font-size: 30px;
	font-weight: 400;
	line-height: normal;
}

.hn-carousel__caption p:not(.muted) {
	width: 100%;
	margin: 0;
	color: var(--gray-01);
	font-size: 18px;
	line-height: 1.4;
}

.hn-carousel__caption .muted {
	margin: 0;
}

/* Dots: real <button> blocks; the label text is visually hidden. */
.hn-page .hn-carousel__dots {
	justify-content: center;
	gap: 8px;
	margin: 60px 0 0;
}

.hn-dot {
	display: flex;
	line-height: 0;
}

.hn-dot .wp-block-button__link {
	display: block;
	width: 12px;
	height: 8px;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.22);
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	transition: width 0.25s ease, background 0.25s ease;
}

.hn-dot--active .wp-block-button__link {
	width: 24px;
	border-radius: 6px;
	background: var(--ice);
}

/* ---------- Footer (template part footer-native) ---------- */
.hn-footer hr.footer-rule.wp-block-separator {
	width: 100%;
	height: 0;
	margin: 20px 0;
	border: 0;
	border-top: 1px solid var(--border);
	background: none;
	opacity: 1;
}

.hn-footer .social-btn a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

/* ---------- Mobile (design breakpoint: 900px, same as purelabs.css) ---------- */
@media (max-width: 900px) {
	.hn-lines {
		white-space: normal;
	}

	/* Navbar: logo + hamburger (core Navigation overlay). */
	.hn-navbar {
		height: 70px;
		margin: 0 14px;
		padding: 0 16px;
		border-radius: 16px;
	}

	.hn-navbar .navbar__mark {
		width: 30px;
		height: 30px;
	}

	.hn-navbar .navbar__word img {
		height: 18px;
	}

	.hn-navbar .hn-nav-cta.wp-block-buttons {
		display: none;
	}

	.hn-hero {
		padding-top: 70px;
	}

	/* Original hero text sits right under the navbar on mobile (not vertically centred). */
	.hn-hero .hero__content {
		flex: none;
		justify-content: flex-start;
	}

	.hn-btn-outline .wp-block-button__link {
		gap: 8px;
		padding: 6px 16px 6px 6px;
		border-radius: 40px;
		font-size: 14px;
	}

	.hn-btn-outline .wp-block-button__link::before {
		width: 38px;
		height: 38px;
		background-size: 16px;
	}

	.hn-tabs {
		width: 100%;
		gap: 6px;
		padding: 6px;
	}

	.hn-tab {
		flex: 1;
	}

	.hn-tab .wp-block-button__link {
		width: 100%;
		padding: 12px 10px;
		font-size: 13px;
		white-space: nowrap;
		text-align: center;
	}

	/* Experiments: image on top, text below (no overlay on small screens). */
	.hn-carousel {
		--slide-w: min(366px, calc(100vw - 48px));
		--slide-gap: 16px;
		max-width: 100%;
	}

	.hn-carousel__viewport {
		height: auto;
		min-height: 0;
	}

	.hn-carousel__slide {
		display: flex;
		flex-direction: column;
		height: auto;
		min-height: 0;
		background: #0e0c15;
	}

	.hn-carousel__bg {
		position: relative;
		inset: auto;
		flex-shrink: 0;
		height: 200px;
		opacity: 1;
	}

	.hn-carousel__bg--sentinel { object-position: 60% center; }
	.hn-carousel__bg--paio { object-position: left center; }

	.hn-carousel__scrim,
	.hn-carousel__logo,
	.hn-carousel__slide.is-active .hn-carousel__logo {
		display: none;
	}

	.hn-carousel__caption {
		position: relative;
		top: auto;
		left: auto;
		gap: 12px;
		width: 100%;
		max-width: none;
		padding: 16px 18px 18px;
		opacity: 1;
	}

	.hn-carousel__caption h3 {
		font-size: 22px;
		color: #fff;
	}

	.hn-carousel__caption p:not(.muted) {
		font-size: 14px;
	}

	.hn-page .hn-carousel__dots {
		margin-top: 28px;
	}
}
