/* Community Group motion (page /community-group/ and its notice on Home).
   Everything is inside no-preference, so reduced motion means no animation at
   all. Content is only ever hidden by a class the script adds. */
@media screen and (prefers-reduced-motion: no-preference) {
	/* Entrance: set by cg-motion.js on things still below the screen. */
	html .sbc-cg-rv:not(.sbc-cg-in) { opacity: 0; transform: translateY(18px); transition: none; }
	html .sbc-cg-rv.sbc-cg-in {
		opacity: 1; transform: none;
		transition: opacity .6s ease-out, transform .6s ease-out;
		transition-delay: var(--sbc-cg-delay, 0ms);
	}
	.sbc-cg-closing .wp-block-cover__inner-container > .sbc-cg-rv,
	.sbc-cg-closing .sbc-pagehero__kicker { animation: none; }

	/* The Join box and map are never hidden, not even by the theme's reveal. */
	html .sbc-cg-join .sbc-contact-grid > .sbc-reveal { opacity: 1; transform: none; transition: none; }

	/* Hero: badge first, then the lines under the title (the theme animates the H1). */
	.sbc-cg-hero .sbc-cg-badge { animation: sbc-cg-badge .7s ease-out both; }
	.sbc-cg-hero .sbc-cg-tagline,
	.sbc-cg-hero .sbc-cg-sub,
	.sbc-cg-hero .sbc-cg-when,
	.sbc-cg-hero .wp-block-buttons { animation: sbc-cg-up .6s ease-out both; }
	.sbc-cg-hero .sbc-cg-tagline { animation-delay: .22s; }
	.sbc-cg-hero .sbc-cg-sub { animation-delay: .3s; }
	.sbc-cg-hero .sbc-cg-when { animation-delay: .38s; }
	.sbc-cg-hero .wp-block-buttons { animation-delay: .46s; }

	/* Home notice: it sits just under the hero, already on screen, so it
	   enters on load (CSS only): card, then photo, line and button. */
	.sbc-cg-promo { animation: sbc-cg-up .6s ease-out .45s backwards; }
	.sbc-cg-promo__photo { animation: sbc-cg-fade .6s ease-out .55s backwards; }
	.sbc-cg-promo__line { animation: sbc-cg-up .5s ease-out .7s backwards; }
	.sbc-cg-promo .wp-block-buttons { animation: sbc-cg-up .5s ease-out .82s backwards; }

	/* One slow zoom on the two big photos; it ends and stays. */
	.sbc-cg-hero, .sbc-cg-closing { overflow: hidden; }
	.sbc-cg-hero .wp-block-cover__image-background { animation: sbc-cg-zoom 18s ease-out both; }
	.sbc-cg-closing.sbc-cg-zooming .wp-block-cover__image-background { animation: sbc-cg-zoom 18s ease-out both; }

	@keyframes sbc-cg-badge { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
	@keyframes sbc-cg-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
	@keyframes sbc-cg-fade { from { opacity: 0; } to { opacity: 1; } }
	@keyframes sbc-cg-zoom { from { transform: scale(1); } to { transform: scale(1.09); } }
}

/* Hover lift, only where there is a real pointer. */
@media screen and (hover: hover) and (prefers-reduced-motion: no-preference) {
	.sbc-cg-card, .sbc-cg-promo { transition: transform .4s ease-out, box-shadow .4s ease-out, border-color .4s ease-out; }
	.sbc-cg-card:hover, .sbc-cg-promo:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16, 18, 21, .12); }
	.sbc-cg-mission .sbc-cg-card:hover { box-shadow: 0 18px 40px rgba(16, 18, 21, .12); }
	.sbc-cg-verse:hover { border-color: rgba(255, 255, 255, .34); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
}

@media print {
	.sbc-cg-rv { opacity: 1 !important; transform: none !important; }
}
