/**
 * Small content pages: FAQ (patterns/faq-page.php, templates/page-faq.html),
 * the 404 page (parent parts/not-found-hero.html, restyled only) and the legal
 * pages (parent templates/page-legal.html; text edited in the page editor).
 *
 * Figma: FAQ 6164:13209, Page 404 6163:12256, Privacy Policy 6163:11445,
 * Returns & Refunds 6163:11802, Shipping and Delivery 6163:11948,
 * Terms and Conditions 6163:12079.
 */

/* No newsletter band on these pages (body class from inc/layout.php). */
body.nx-no-cta .nx-cta {
	display: none;
}

/* ------------------------------------------------------------------- FAQ -- */

/* Figma: a 1px rule between the questions and the footer (QA Nov 2026). */
.pepti-template-page--faq {
	border-block-end: 1px solid var(--pepti-color-global-border-base, #041e42);
	background-color: var(--pepti-color-global-surface-base, #00080f);
}

.pepti-template-page--faq > .wp-block-post-content {
	margin-block: 0;
}

.nx-faq {
	padding-block: var(--pepti-size-spacing-primitive-lg, 60px);
}

.nx-faq__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--pepti-size-spacing-primitive-md, 40px);
}

.nx-faq__inner > *,
.nx-faq__intro > * {
	margin-block: 0;
}

.nx-faq__intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--pepti-size-spacing-primitive-xs, 20px);
	max-inline-size: 940px;
	text-align: center;
}

.nx-faq__title {
	font-family: var(--pepti-type-home-section-desktop-title-font-family, "Space Grotesk", sans-serif);
	font-size: var(--pepti-type-home-section-desktop-title-font-size, 40px);
	font-weight: var(--pepti-type-home-section-desktop-title-font-weight, 600);
	line-height: 1;
	color: var(--pepti-color-global-content-primary, #fff);
}

.nx-faq__text {
	font-family: var(--pepti-type-body-default-desktop-regular-font-family, "Poppins", sans-serif);
	font-size: var(--pepti-type-body-default-desktop-regular-font-size, 16px);
	line-height: 1.4;
	color: var(--pepti-color-global-content-base, #e6e7e7);
}

.nx-faq__text a {
	color: var(--pepti-color-global-content-accent, #05f4f9);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* FAQ Card/Desktop (3443:7491): 20px padding, bottom rule, 24px question, 80% answer. */
.nx-faq .wp-block-accordion.nx-faq__list {
	inline-size: 100%;
	max-inline-size: 940px;
	margin-inline: auto;
}

.nx-faq .nx-faq__list > .wp-block-accordion-item,
.nx-faq .nx-faq__list > .wp-block-accordion-item.is-open {
	padding: var(--pepti-size-spacing-semantic-card-padding, 20px);
	border: 0;
	border-block-end: 1px solid var(--pepti-color-global-border-subtle, #041e42);
	border-radius: 0;
	background: var(--pepti-color-global-surface-base, #00080f);
}

.nx-faq .nx-faq__list .wp-block-accordion-heading__toggle {
	min-block-size: 44px;
	font-family: var(--pepti-type-home-card-desktop-title-font-family, "Space Grotesk", sans-serif);
	font-size: var(--pepti-type-home-card-desktop-title-font-size, 24px);
	font-weight: var(--pepti-type-home-card-desktop-title-font-weight, 600);
	line-height: 1.2;
	text-align: start;
	color: var(--pepti-color-global-content-primary, #fff);
}

.nx-faq .nx-faq__list .wp-block-accordion-panel {
	padding-block-start: 10px;
	font-family: var(--pepti-type-home-card-desktop-body-font-family, "Poppins", sans-serif);
	font-size: var(--pepti-type-home-card-desktop-body-font-size, 16px);
	line-height: 1.4;
	color: var(--pepti-color-global-content-primary, #fff);
	opacity: 0.8;
}

.nx-faq .nx-faq__list .wp-block-accordion-panel > * {
	margin-block: 0;
}

.nx-faq .nx-faq__list .wp-block-accordion-heading__toggle:focus-visible {
	outline: 2px solid var(--pepti-color-global-content-accent, #05f4f9);
	outline-offset: 4px;
}

/* ------------------------------------------------------------------- 404 -- */

/* Dark surface with the molecule photo at 50% (same image as Partnership). */
.c-not-found-hero {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-block-size: max(600px, min(913px, calc(100svh - 30px)));
	padding: calc(var(--pepti-shell-overlay-space, 0px) + 60px) var(--nx-gutter-fluid, 100px) 60px;
	border-radius: 0;
	background: var(--pepti-color-global-surface-base, #00080f);
}

/* Drop the parent's light default photo (set through a background variable). */
.wp-block-cover.c-not-found-hero {
	--pepti-background-not-found-hero-responsive: none;
	background-image: none;
	border-radius: 0;
}

.c-not-found-hero {
	overflow: hidden;
}

/*
 * The 1792px photo is upscaled ~2.4x on a full-height Retina hero, so it is
 * shown out of focus (depth-of-field blur) with a slow drift instead of
 * pixelated. Scaled past the edges so the blur does not fade them.
 */
.c-not-found-hero::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background: url("../images/home/partnership-bg.jpg") no-repeat center / cover;
	opacity: 0.5;
	filter: blur(6px);
	transform: scale(1.08);
	pointer-events: none;
	animation: nx-not-found-drift 30s ease-in-out infinite alternate;
}

@keyframes nx-not-found-drift {
	from {
		transform: scale(1.08) translate3d(0, 0, 0);
	}

	to {
		transform: scale(1.14) translate3d(-1.5%, 1%, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-not-found-hero::before {
		animation: none;
	}
}

.c-not-found-hero .c-not-found-hero__inner {
	gap: var(--pepti-size-spacing-primitive-lg, 60px);
	inline-size: min(772px, 100%);
}

/* The H1 keeps "404" as text for screen readers; the Figma artwork is drawn. */
.c-not-found-hero .c-not-found-hero__code {
	inline-size: 350px;
	max-inline-size: 100%;
	aspect-ratio: 349.644 / 144.4;
	overflow: hidden;
	background: url("../images/404/404.svg") no-repeat center / contain;
	font-size: 0;
	line-height: 0;
	color: transparent;
}

.c-not-found-hero .c-not-found-hero__content {
	gap: var(--pepti-size-spacing-primitive-xs, 20px);
}

.c-not-found-hero .c-not-found-hero__title {
	font-family: var(--pepti-type-heading-h1-tablet-semi-bold-font-family, "Space Grotesk", sans-serif);
	font-size: var(--pepti-type-heading-h1-tablet-semi-bold-font-size, 50px);
	font-weight: var(--pepti-type-heading-h1-tablet-semi-bold-font-weight, 600);
	line-height: 1;
	color: var(--pepti-color-global-content-primary, #fff);
	text-wrap: balance;
}

.c-not-found-hero .c-not-found-hero__copy {
	max-inline-size: 560px;
	font-size: 16px;
	line-height: 1.4;
	color: var(--pepti-color-global-content-base, #e6e7e7);
	opacity: 1;
}

/* Figma: plain 56px primary pill, no arrow segment. */
.c-not-found-hero .c-not-found-hero__actions .c-button {
	--pepti-button-type-action-before-display: none;
	--pepti-button-type-action-after-display: none;
	--pepti-button-segment-size: 0px;
	box-sizing: border-box;
	block-size: 56px;
	min-block-size: 56px;
	padding: 16px 30px;
	gap: 0;
	font-family: var(--pepti-type-button-default-desktop-medium-font-family, "Poppins", sans-serif);
	font-size: var(--pepti-type-button-default-desktop-medium-font-size, 16px);
	font-weight: var(--pepti-type-button-default-desktop-medium-font-weight, 500);
	line-height: 1.4;
}

.c-not-found-hero .c-not-found-hero__actions .c-button::before,
.c-not-found-hero .c-not-found-hero__actions .c-button::after {
	content: none;
}

/* ---------------------------------------------------------------- phone -- */

@media (max-width: 767px) {
	.nx-faq {
		padding-block: var(--pepti-size-spacing-primitive-md, 40px);
	}

	.nx-faq__inner {
		gap: 30px;
	}

	.nx-faq__title {
		font-size: var(--pepti-type-home-section-mobile-title-font-size, 30px);
	}

	.nx-faq .nx-faq__list > .wp-block-accordion-item,
	.nx-faq .nx-faq__list > .wp-block-accordion-item.is-open {
		padding: 20px 0;
	}

	.nx-faq .nx-faq__list .wp-block-accordion-heading__toggle {
		font-size: 18px;
	}

	.nx-faq .nx-faq__list .wp-block-accordion-panel {
		font-size: 14px;
	}

	.c-not-found-hero {
		min-block-size: 560px;
		padding-block-end: 40px;
	}

	.c-not-found-hero .c-not-found-hero__inner {
		gap: 40px;
	}

	.c-not-found-hero .c-not-found-hero__code {
		inline-size: 220px;
	}

	.c-not-found-hero .c-not-found-hero__title {
		font-size: var(--pepti-type-heading-h2-mobile-semi-bold-font-size, 30px);
	}
}

/* ----------------------------------------------------------------- legal -- */

/* A 1px rule above the footer (no newsletter band, see the top of this file). */
.pepti-template-page--legal {
	border-block-end: 1px solid var(--pepti-color-global-border-base, #041e42);
}

.pepti-template-page--legal .l-page-content--legal {
	max-inline-size: none;
	margin: 0;
	padding: var(--pepti-size-spacing-semantic-section-padding-y, 60px) var(--pepti-size-spacing-primitive-xl, 100px);
}

/* One 940px column: 20px between blocks, 30px before each section heading. */
.pepti-template-page--legal .l-page-content--legal .l-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
	box-sizing: border-box;
	inline-size: 100%;
	max-inline-size: 940px;
	margin-inline: auto;
	padding: 0;
}

.pepti-template-page--legal .l-content > * {
	max-inline-size: none;
	margin: 0 !important;
}

.pepti-template-page--legal .l-content > :is(h2, h3, h4):not(:first-child) {
	margin-block-start: 10px !important;
}

.pepti-template-page--legal .l-content :is(h2, h3, h4) {
	font-family: var(--pepti-type-heading-h3-desktop-semi-bold-font-family, "Space Grotesk", sans-serif);
	font-size: var(--pepti-type-heading-h3-desktop-semi-bold-font-size, 24px);
	font-weight: var(--pepti-type-heading-h3-desktop-semi-bold-font-weight, 600);
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--pepti-color-global-content-primary, #fff);
}

.pepti-template-page--legal .l-content :is(p, ul, ol) {
	font-family: var(--pepti-type-body-default-desktop-regular-font-family, "Poppins", sans-serif);
	font-size: var(--pepti-type-body-default-desktop-regular-font-size, 16px);
	font-weight: 400;
	line-height: 1.4;
	color: var(--pepti-color-global-content-base, #e6e7e7);
	opacity: 0.8;
}

/* "Last Updated: …" (Figma caption): add the class nx-legal-updated to the paragraph. */
.pepti-template-page--legal .l-content > p.nx-legal-updated {
	margin-block-end: 10px !important;
	font-family: var(--pepti-type-caption-desktop-regular-font-family, "Space Grotesk", sans-serif);
	font-size: var(--pepti-type-caption-desktop-regular-font-size, 14px);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 1;
}

.pepti-template-page--legal .l-content :is(ul, ol) {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-inline-start: 1.5em;
}

.pepti-template-page--legal .l-content ul {
	list-style: disc;
}

.pepti-template-page--legal .l-content ol {
	list-style: decimal;
}

.pepti-template-page--legal .l-content li {
	margin: 0;
	padding: 0;
}

.pepti-template-page--legal .l-content li::marker {
	color: inherit;
}

.pepti-template-page--legal .l-content a {
	text-decoration: underline;
	text-underline-position: from-font;
	color: var(--pepti-color-global-content-accent, #05f4f9);
}

.pepti-template-page--legal .l-content strong {
	font-weight: 600;
	color: var(--pepti-color-global-content-primary, #fff);
}

@media (max-width: 767px) {
	.pepti-template-page--legal .l-page-content--legal {
		padding: var(--pepti-size-spacing-primitive-md, 40px) var(--pepti-size-spacing-primitive-xs, 20px);
	}

	.pepti-template-page--legal .l-content :is(h2, h3, h4) {
		font-size: var(--pepti-type-heading-h3-mobile-semi-bold-font-size, 20px);
	}

	.pepti-template-page--legal .l-content :is(p, ul, ol) {
		font-size: var(--pepti-type-body-default-mobile-regular-font-size, 14px);
	}
}
