/*
 * Proweaver Factory: shared helpers. Section styles go in assets/css/sections/<section>.css.
 *
 * Scroll animations: add the class pf-reveal to a block, plus one direction (pf-reveal-up, -down, -left, -right, -zoom)
 * and optionally a delay (pf-delay-1 to pf-delay-4). assets/js/animate.js adds .is-visible when the block comes into
 * view. Nothing is hidden without JavaScript, in the editor, or for visitors who ask for reduced motion.
 */
.pf-js .pf-reveal {
	opacity: 0;
	transition: opacity var(--pf-reveal-duration, 0.6s) ease, transform var(--pf-reveal-duration, 0.6s) ease;
	will-change: opacity, transform;
}
.pf-js .pf-reveal-up { transform: translateY(24px); }
.pf-js .pf-reveal-down { transform: translateY(-24px); }
.pf-js .pf-reveal-left { transform: translateX(-32px); }
.pf-js .pf-reveal-right { transform: translateX(32px); }
.pf-js .pf-reveal-zoom { transform: scale(0.94); }
.pf-js .pf-reveal.is-visible { opacity: 1; transform: none; }
.pf-delay-1 { transition-delay: 0.1s; }
.pf-delay-2 { transition-delay: 0.2s; }
.pf-delay-3 { transition-delay: 0.3s; }
.pf-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
	.pf-js .pf-reveal { opacity: 1; transform: none; transition: none; }
}

/* In the editor everything stays visible. */
.editor-styles-wrapper .pf-reveal { opacity: 1 !important; transform: none !important; }

/* A visible keyboard focus for everything clickable. */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, currentColor);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------------------------------------------
   Agape Heritage Homes: shared tokens and components (section-specific rules live in assets/css/sections/).
   --------------------------------------------------------------------------------------------------------------- */
:root {
	--pf-deep: var(--wp--preset--color--deep);
	--pf-sky: var(--wp--preset--color--primary);
	--pf-sky-ink: var(--wp--preset--color--primary-dark);
	--pf-orange: var(--wp--preset--color--accent);
	--pf-orange-ink: var(--wp--preset--color--accent-dark);
	--pf-ink: var(--wp--preset--color--contrast);
	--pf-muted: var(--wp--preset--color--muted);
	--pf-line: var(--wp--preset--color--line);
	--pf-soft: var(--wp--preset--color--secondary);
	--pf-tint: var(--wp--preset--color--tint);
	--pf-white: var(--wp--preset--color--base);
	--pf-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
	--pf-serif: var(--wp--preset--font-family--heading);
}
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks main { margin-block-start: 0; }
img { max-width: 100%; height: auto; }

.pf-eyebrow {
	margin: 0;
	color: var(--pf-orange-ink);
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

/* Buttons: pill shape, lift and glow on hover, arrow icons added by class. */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.9em;
	border: 1px solid transparent;
	text-decoration: none;
	transition: transform 0.45s var(--pf-ease), box-shadow 0.45s, background-color 0.3s, color 0.3s, border-color 0.3s;
}
.wp-block-button__link:hover { transform: translateY(-3px) scale(1.035); box-shadow: 0 12px 28px rgba(255, 133, 1, 0.32); }
.wp-block-button__link:active { transform: translateY(0) scale(0.98); }
.wp-block-button.pf-arrow-out .wp-block-button__link::after,
.wp-block-button.pf-arrow-right .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 0.9em;
	height: 0.9em;
	background: currentColor;
	transition: transform 0.25s;
}
.wp-block-button.pf-arrow-out .wp-block-button__link::after {
	-webkit-mask: url(../svg/arrow-up-right-from-square.svg) center / contain no-repeat;
	mask: url(../svg/arrow-up-right-from-square.svg) center / contain no-repeat;
}
.wp-block-button.pf-arrow-right .wp-block-button__link::after {
	-webkit-mask: url(../svg/arrow-right.svg) center / contain no-repeat;
	mask: url(../svg/arrow-right.svg) center / contain no-repeat;
}
.wp-block-button.pf-arrow-right .wp-block-button__link:hover::after { transform: translateX(4px); }

/* Plain text links made from button blocks (contact details, footer links). */
.wp-block-button.pf-link-button .wp-block-button__link {
	padding: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-weight: 400;
	letter-spacing: 0;
	box-shadow: none;
}
.wp-block-button.pf-link-button .wp-block-button__link:hover { background: none; transform: none; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.wp-block-button__link { transition: none; }
}

/* Back-to-top button (created by assets/js/site.js). */
.pf-back-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 40;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--pf-orange);
	color: var(--pf-deep);
	box-shadow: 0 8px 22px rgba(255, 133, 1, 0.35);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transform: translateY(10px);
	transition: opacity 0.3s, transform 0.3s, background 0.3s;
}
.pf-back-top::before {
	content: "";
	display: block;
	width: 14px;
	height: 14px;
	margin: auto;
	background: currentColor;
	-webkit-mask: url(../svg/arrow-up.svg) center / contain no-repeat;
	mask: url(../svg/arrow-up.svg) center / contain no-repeat;
}
.pf-back-top.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.pf-back-top:hover, .pf-back-top:focus-visible { background: var(--pf-sky); }

/* Pages without a hero start below the fixed header. */
body:not(:has(main [class*="-hero"])) .wp-site-blocks > main { padding-top: calc(78px + var(--wp--preset--spacing--60)) !important; }

/* Page sections sit flush against each other. */
.wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }
