/* StratApps template: behaviour that React/Framer Motion handled on stratapps.com */

/* Scroll reveal (replaces Framer Motion initial/whileInView) */
[data-sa-reveal] {
	opacity: 0;
	transform: translateY(var(--sa-y, 12px));
	transition: opacity .6s ease-out, transform .6s ease-out;
}
[data-sa-reveal].is-visible {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	[data-sa-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Layer detail panel fade when switching layers */
[data-sa-layer-panel].is-switching {
	opacity: 0;
	transform: translateY(8px);
	transition: none;
}

/* Keep the sticky header below the WordPress admin bar */
.admin-bar header.sticky {
	top: 32px;
}
@media screen and (max-width: 782px) {
	.admin-bar header.sticky {
		top: 46px;
	}
}

/* ---------- Blog ---------- */
.sa-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

.sa-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.sa-chip {
	display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 9999px;
	padding: .375rem .875rem; font-size: .8125rem; color: var(--muted-foreground);
	background: color-mix(in oklab, var(--background) 40%, transparent); transition: color .15s, border-color .15s, background-color .15s;
}
.sa-chip:hover { color: var(--foreground); border-color: color-mix(in oklab, var(--accent) 60%, transparent); }
.sa-chip.is-active { color: #fff; border-color: transparent; background: linear-gradient(to right, var(--accent), var(--cyan)); }

.sa-post-grid { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .sa-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sa-post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.sa-post-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.sa-post-card__media img, .sa-feature__media img { transition: transform .5s ease; }
.sa-post-card:hover .sa-post-card__media img, .sa-feature:hover .sa-feature__media img { transform: scale(1.03); }

.sa-feature { display: grid; }
.sa-feature__media { aspect-ratio: 16 / 10; overflow: hidden; }
.sa-feature__body { display: flex; flex-direction: column; justify-content: center; padding: 1.75rem; }
@media (min-width: 1024px) {
	.sa-feature { grid-template-columns: 1.15fr 1fr; }
	.sa-feature__media { aspect-ratio: auto; min-height: 100%; }
	.sa-feature__body { padding: 2.5rem; }
}

.sa-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 3rem; }
.sa-pagination .page-numbers {
	display: inline-flex; min-width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; padding: 0 .875rem;
	border: 1px solid var(--border); border-radius: 9999px; font-size: .875rem; color: var(--muted-foreground);
}
.sa-pagination a.page-numbers:hover { color: var(--foreground); border-color: color-mix(in oklab, var(--accent) 60%, transparent); }
.sa-pagination .page-numbers.current { color: #fff; border-color: transparent; background: linear-gradient(to right, var(--accent), var(--cyan)); }
.sa-pagination .page-numbers.dots { border-color: transparent; }

.sa-byline { display: flex; align-items: center; gap: .75rem; }
.sa-byline__avatar { width: 40px; height: 40px; border-radius: 9999px; border: 1px solid var(--border); }
.sa-post-hero-img { aspect-ratio: 16 / 9; }

.sa-share {
	display: inline-flex; align-items: center; height: 2rem; padding: 0 .75rem; border: 1px solid var(--border);
	border-radius: 9999px; font-size: .8125rem; color: var(--muted-foreground); background: transparent; cursor: pointer;
}
.sa-share:hover { color: var(--foreground); border-color: color-mix(in oklab, var(--accent) 60%, transparent); }

/* Post body typography */
.sa-prose { font-size: 1.0625rem; line-height: 1.8; color: color-mix(in oklab, var(--foreground) 85%, transparent); }
.sa-prose > * + * { margin-top: 1.25em; }
.sa-prose h2, .sa-prose h3, .sa-prose h4 { font-family: var(--font-display, "Space Grotesk", sans-serif); color: var(--foreground); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.sa-prose h2 { font-size: 1.75rem; margin-top: 2em; }
.sa-prose h3 { font-size: 1.375rem; margin-top: 1.75em; }
.sa-prose h4 { font-size: 1.125rem; margin-top: 1.5em; }
.sa-prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.sa-prose strong { color: var(--foreground); font-weight: 600; }
.sa-prose ul, .sa-prose ol { padding-left: 1.4em; }
.sa-prose ul { list-style: disc; }
.sa-prose ol { list-style: decimal; }
.sa-prose li + li { margin-top: .4em; }
.sa-prose li::marker { color: var(--cyan); }
.sa-prose blockquote { border-left: 3px solid var(--accent); padding: .25em 0 .25em 1.25em; color: var(--foreground); font-style: italic; }
.sa-prose img, .sa-prose video, .sa-prose iframe { max-width: 100%; height: auto; border-radius: 1rem; border: 1px solid var(--border); }
.sa-prose figure { margin-left: 0; margin-right: 0; }
.sa-prose figcaption, .sa-prose .wp-caption-text { margin-top: .5em; font-size: .875rem; color: var(--muted-foreground); text-align: center; }
.sa-prose code { font-family: "JetBrains Mono", monospace; font-size: .875em; padding: .15em .4em; border-radius: .375rem; background: var(--secondary); }
.sa-prose pre { overflow-x: auto; padding: 1.25em; border-radius: 1rem; border: 1px solid var(--border); background: var(--card); }
.sa-prose pre code { padding: 0; background: none; }
.sa-prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.sa-prose th, .sa-prose td { padding: .6em .8em; border: 1px solid var(--border); text-align: left; }
.sa-prose th { color: var(--foreground); background: var(--secondary); }
.sa-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.sa-prose .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.sa-prose .alignright { float: right; margin: .3em 0 1em 1.5em; }
.sa-prose .aligncenter { margin-left: auto; margin-right: auto; }

/* Enquiry form select (native replacement for the Radix select) */
.sa-select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 2rem;
}
.sa-select option {
	background: var(--popover);
	color: var(--popover-foreground);
}
.sa-select__icon {
	position: absolute;
	right: .75rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

[data-sa-form-error][hidden],
[data-sa-form-success][hidden],
form[hidden],
#sa-mobile-menu[hidden],
[data-sa-icon-open][hidden],
[data-sa-icon-close][hidden] {
	display: none;
}

/* Utilities used by the blog that the compiled stratapps.com stylesheet doesn't include */
.max-w-5xl { max-width: 64rem; }
.pt-8 { padding-top: 2rem; }
.pt-12 { padding-top: 3rem; }
@media (min-width: 48rem) { .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; } }

/* Blog: featured card alignment and image placeholder */
.sa-feature__body { align-items: flex-start; }
.sa-media-placeholder {
	position: relative; display: flex; height: 100%; min-height: 100%; align-items: center; justify-content: center;
	color: var(--cyan);
	background:
		radial-gradient(60% 80% at 20% 10%, color-mix(in oklab, var(--accent) 35%, transparent), transparent 70%),
		radial-gradient(60% 80% at 90% 90%, color-mix(in oklab, var(--cyan) 25%, transparent), transparent 70%),
		var(--card);
}
.sa-media-placeholder::before {
	content: ""; position: absolute; inset: 0; opacity: .25;
	background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
	background-size: 32px 32px;
}
.sa-media-placeholder svg { position: relative; }

/* Elementor pages inside the StratApps layout: restore heading sizes the base stylesheet resets.
   Sizes set in Elementor are more specific and still win. */
.elementor h1.elementor-heading-title { font-size: 3rem; line-height: 1.1; }
.elementor h2.elementor-heading-title { font-size: 2.25rem; line-height: 1.15; }
.elementor h3.elementor-heading-title { font-size: 1.75rem; line-height: 1.2; }
.elementor h4.elementor-heading-title { font-size: 1.375rem; line-height: 1.3; }
.elementor h5.elementor-heading-title { font-size: 1.125rem; }
.elementor h6.elementor-heading-title { font-size: 1rem; }
.elementor .elementor-heading-title { font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.01em; }
