/*
 * PEPAH's own touches on top of Quantum, on every page and in the editor. (Colours, fonts and spacing are in
 * theme.json; feature styles such as the lists and forms are in their own files and load only where used.)
 */

/* Home page hero: the title, intro and buttons fade in one after another. */
@keyframes pepah-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.home-hero-title {
	opacity: 0;
	animation: pepah-fade-in 1s ease-in .1s forwards;
}

.home-hero-lede {
	opacity: 0;
	animation: pepah-fade-in 1s ease-in .8s forwards;
}

.home-hero-buttons {
	opacity: 0;
	animation: pepah-fade-in 1s ease-in 1.6s forwards;
}

@media (prefers-reduced-motion: reduce) {
	.home-hero-title,
	.home-hero-lede,
	.home-hero-buttons {
		opacity: 1;
		animation: none;
	}
}

/* Hero sizes on phones and small tablets. */
@media (max-width: 768px) {
	.home-hero-inner {
		max-width: 100% !important;
	}

	.inner-hero {
		min-height: 300px !important;
	}
}

/* The decorative SVGs that overlap the corners of feature sections (classes set on the image blocks). */
.wp-block .feature-icon-left,
.feature-icon-left {
	top: calc(-1 * var(--wp--preset--spacing--30)) !important;
	left: calc(-1 * var(--wp--preset--spacing--30));
}

.wp-block .feature-icon-right,
.feature-icon-right {
	top: calc(-1 * var(--wp--preset--spacing--30)) !important;
	right: calc(-1 * var(--wp--preset--spacing--30));
}

@media (max-width: 768px) {
	.feature-icon-left,
	.feature-icon-right {
		width: 150px;
	}
}

/* Form labels (Register, Contact, the application) a little lighter than the default bold. */
.jet-form-builder__label-text {
	font-weight: 500 !important;
}

/* "Photo: …" credit in the corner of stock photos (inc/media/credits.php). */
.has-photo-credit {
	position: relative;
}
.pepah-photo-credit {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 2;
	max-width: calc(100% - 16px);
	padding: 2px 7px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 11px;
	line-height: 1.5;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pepah-photo-credit a {
	color: inherit;
	text-decoration: underline;
}

/* Accessibility ------------------------------------------------------------------------------------------ */

/* Read by screen readers, not shown: the member pages' page title (each page needs a top-level heading). */
.pepah-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.pepah-sr-only + * {
	margin-block-start: 0;
}

/* Quantum's secondary button puts accent text on a pale accent tint, just under the 4.5:1 contrast small text
   needs; a slightly darker accent clears it. */
.wp-block-button.is-style-secondary-button > .wp-block-button__link:not(:hover):not(:focus) {
	color: color-mix(in srgb, var(--wp--preset--color--accent) 85%, #000);
}

/* Carousels and sideways rows take keyboard focus (to scroll with the arrow keys), so show where it is. */
.pepah-list__items:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 4px;
}
