/* Roatan Connections — light animations (07/10). Only with "no-preference" for reduced motion; no smooth scrolling.
   1) reveal: titles/cards rise when they appear (IntersectionObserver adds .rc-in; html.rc-anim-on is set in <head>)
   2) the route line draws itself while scrolling   3) the cruise band changes color while scrolling into it
   4) photos settle with a soft zoom. 2-4 = CSS scroll-driven animations (browsers without support: no animation). */
@media (prefers-reduced-motion: no-preference) {
	/* 1. reveal */
	html.rc-anim-on :is(.rc-h2, .rc-page-title, .rc-tour-title, .rc-shop-title, .rc-stop-body, .rc-card, .rc-steps li, .rc-services li, .rc-contact-cards li, .rc-concierge, .rc-book-card, .rc-prose):not(.rc-in) {
		opacity: 0; transform: translateY(26px);
	}
	html.rc-anim-on :is(.rc-h2, .rc-page-title, .rc-tour-title, .rc-shop-title, .rc-stop-body, .rc-card, .rc-steps li, .rc-services li, .rc-contact-cards li, .rc-concierge, .rc-book-card, .rc-prose) {
		transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
	}
	html.rc-anim-on :is(.rc-card, .rc-steps li, .rc-services li, .rc-contact-cards li):nth-child(2) { transition-delay: .08s; }
	html.rc-anim-on :is(.rc-card, .rc-steps li, .rc-services li, .rc-contact-cards li):nth-child(3) { transition-delay: .16s; }
	html.rc-anim-on :is(.rc-card, .rc-steps li, .rc-services li, .rc-contact-cards li):nth-child(4) { transition-delay: .24s; }
	html.rc-anim-on .rc-card:nth-child(5) { transition-delay: .32s; }

	@supports (animation-timeline: view()) {
		/* 2. the route line draws itself */
		.rc-route::before { animation: rc-draw linear both; animation-timeline: view(); animation-range: entry 0% cover 85%; }
		@keyframes rc-draw { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

		/* 3. cruise band: page color → band color while it scrolls in (an overlay fades out; Divi's background is !important) */
		.rc-cruise::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--gcid-0e2f2f3b-6069-463a-b25e-ff5bea86d2db); animation: rc-fade linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
		.rc-cruise > .et_pb_top_inside_divider { z-index: 1; }
		@keyframes rc-fade { from { opacity: 1; } to { opacity: 0; } }

		/* 4. photos: soft zoom into place while entering (the organic shape is on the img itself, so it grows, never overflows) */
		:is(.rc-stop-img, .rc-transport-img, .rc-card-img) img { animation: rc-zoom linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
		@keyframes rc-zoom { from { transform: scale(.9); opacity: .6; } to { transform: scale(1); opacity: 1; } }
	}
}
