/**
 * Gateway scroll choreography — sequenced section reveal + staggered cards.
 *
 * Motion template matches footer .wow.tpfadeUp (Quitox fade-up).
 *
 * @package Paramour_Pre_App
 */

@keyframes paramour-gateway-section-in {
	0% {
		opacity: 0;
		transform: translateY(28px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes paramour-gateway-tpupdown {
	0% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(-12px);
	}
}

body.paramour-pre-app-gateway-page {
	--paramour-reveal-duration: 0.9s;
	--paramour-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--paramour-reveal-offset: 28px;
}

/* Shared pre-reveal (footer parity). */
body.paramour-pre-app-gateway-page .paramour-gateway-reveal-target:not(.is-revealed-item) {
	opacity: 0;
	transform: translateY(var(--paramour-reveal-offset));
	visibility: hidden;
}

body.paramour-pre-app-gateway-page .paramour-gateway-reveal-target.is-revealed-item {
	visibility: visible;
	animation: paramour-gateway-section-in var(--paramour-reveal-duration) var(--paramour-reveal-ease) both;
}

/* --- Section queue (non-inner / non-in-view) --- */

body.paramour-pre-app-gateway-page [data-paramour-reveal]:not(.is-revealed):not([data-paramour-reveal-mode="fade"]):not([data-paramour-reveal-mode="inner"]):not([data-paramour-reveal-mode="in-view"]) {
	opacity: 0;
	transform: translateY(var(--paramour-reveal-offset));
	visibility: hidden;
}

body.paramour-pre-app-gateway-page [data-paramour-reveal].is-revealed:not([data-paramour-reveal-mode="fade"]):not([data-paramour-reveal-mode="inner"]):not([data-paramour-reveal-mode="in-view"]) {
	visibility: visible;
	animation: paramour-gateway-section-in var(--paramour-reveal-duration) var(--paramour-reveal-ease) both;
}

/* Auth block — logo, tabs, form, switch. */
body.paramour-pre-app-gateway-page .paramour-auth-reveal-item:not(.is-auth-item-revealed) {
	opacity: 0;
	transform: translateY(var(--paramour-reveal-offset));
	visibility: hidden;
}

body.paramour-pre-app-gateway-page .paramour-auth-reveal-item.is-auth-item-revealed {
	visibility: visible;
	animation: paramour-gateway-section-in var(--paramour-reveal-duration) var(--paramour-reveal-ease) both;
}

/* Login tab — fully visible on first paint (excluded from auth reveal stagger in JS). */
body.paramour-pre-app-gateway-page #sign-in-dialog #tab1,
body.paramour-pre-app-gateway-page #sign-in-dialog #tab1.paramour-auth-reveal-item,
body.paramour-pre-app-gateway-page #sign-in-dialog #tab1.paramour-auth-reveal-item:not(.is-auth-item-revealed),
body.paramour-pre-app-gateway-page #sign-in-dialog #tab1.paramour-auth-reveal-item.is-auth-item-revealed {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	animation: none !important;
}

/* Scroll choreography owns upper auth motion — avoid double fade from login-forms-visible. */
body.paramour-pre-app-gateway-page.login-forms-visible .tabs-container,
body.paramour-pre-app-gateway-page.login-forms-visible .tabs-container .tabs-nav,
body.paramour-pre-app-gateway-page.login-forms-visible .tabs-container #tab1 {
	animation: none !important;
}

/* Feature cards — same stagger cadence as auth/hero items. */
body.paramour-pre-app-gateway-page .paramour-auth-feature-card:not(.is-card-item-revealed) {
	opacity: 0;
	transform: translateY(var(--paramour-reveal-offset));
	visibility: hidden;
}

body.paramour-pre-app-gateway-page .paramour-auth-feature-card.is-card-item-revealed {
	visibility: visible;
	animation: paramour-gateway-section-in var(--paramour-reveal-duration) var(--paramour-reveal-ease) both;
}

/* AI section — intro then chat block. */
body.paramour-pre-app-gateway-page .paramour-auth-ai-section:not(.is-revealed) .paramour-auth-ai-section__intro,
body.paramour-pre-app-gateway-page .paramour-auth-ai-section:not(.is-revealed) .paramour-auth-ai-section__chat {
	opacity: 0;
	transform: translateY(var(--paramour-reveal-offset));
	visibility: hidden;
}

body.paramour-pre-app-gateway-page .paramour-auth-ai-section.is-revealed .paramour-auth-ai-section__intro {
	visibility: visible;
	animation: paramour-gateway-section-in var(--paramour-reveal-duration) var(--paramour-reveal-ease) both;
}

body.paramour-pre-app-gateway-page .paramour-auth-ai-section.is-revealed .paramour-auth-ai-section__chat {
	visibility: visible;
	animation: paramour-gateway-section-in var(--paramour-reveal-duration) var(--paramour-reveal-ease) both;
	animation-delay: 0.12s;
}

/* Remote footer — unchanged (reference template). */
body.paramour-pre-app-gateway-page .paramour-services-footer-shell[data-paramour-footer-stagger="1"] .wow.tpfadeUp:not(.is-footer-item-revealed) {
	opacity: 0;
	transform: translateY(var(--paramour-reveal-offset));
	visibility: hidden;
}

body.paramour-pre-app-gateway-page .paramour-services-footer-shell[data-paramour-footer-stagger="1"] .wow.tpfadeUp.is-footer-item-revealed {
	visibility: visible;
	animation: paramour-gateway-section-in var(--paramour-reveal-duration) var(--paramour-reveal-ease) both;
}

/* Hero scroll-down cue (Quitox .scroll-dots). */
body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down {
	display: none;
	position: absolute;
	left: 12px;
	bottom: 12%;
	z-index: 2;
}

@media only screen and (min-width: 1200px) {
	body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down {
		display: block;
	}
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	color: rgba(255, 255, 255, 0.85);
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-dots {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	animation: paramour-gateway-tpupdown 0.6s infinite alternate;
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-dots__circle {
	border-radius: 50%;
	display: block;
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-dots__circle--1 {
	width: 15px;
	height: 15px;
	background-color: rgba(255, 255, 255, 0.12);
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-dots__circle--2 {
	width: 9px;
	height: 9px;
	background-color: rgba(255, 255, 255, 0.4);
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-dots__circle--3 {
	width: 5px;
	height: 5px;
	background-color: #fff;
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-dots__label {
	transform: rotate(90deg);
	margin: 48px 0 12px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.45em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-mouse {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	transform: rotate(180deg);
	cursor: pointer;
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-mouse svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

/* Back to top (Quitox .scroll-top). */
body.paramour-pre-app-gateway-page .paramour-gateway-scroll-top {
	width: 50px;
	height: 50px;
	line-height: 50px;
	position: fixed;
	bottom: -10%;
	right: 24px;
	font-size: 18px;
	border-radius: 6px;
	z-index: 998;
	color: var(--paramour-brand-on-primary, #fff);
	text-align: center;
	cursor: pointer;
	background: var(--paramour-brand-primary, #ec4f6a);
	transition: bottom 1s ease, opacity 0.3s ease, transform 0.2s ease;
	border: none;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	padding: 0;
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-top.is-open {
	bottom: 24px;
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-top:hover,
body.paramour-pre-app-gateway-page .paramour-gateway-scroll-top:focus-visible {
	transform: translateY(-2px);
	outline: 2px solid rgba(236, 79, 106, 0.45);
	outline-offset: 2px;
}

body.paramour-pre-app-gateway-page .paramour-gateway-scroll-top svg {
	width: 20px;
	height: 20px;
	vertical-align: middle;
	fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
	body.paramour-pre-app-gateway-page [data-paramour-reveal],
	body.paramour-pre-app-gateway-page .paramour-auth-reveal-item,
	body.paramour-pre-app-gateway-page .paramour-auth-feature-card,
	body.paramour-pre-app-gateway-page .paramour-auth-ai-section__intro,
	body.paramour-pre-app-gateway-page .paramour-auth-ai-section__chat,
	body.paramour-pre-app-gateway-page .paramour-services-footer-shell[data-paramour-footer-stagger="1"] .wow.tpfadeUp {
		opacity: 1 !important;
		transform: none !important;
		visibility: visible !important;
		animation: none !important;
	}

	body.paramour-pre-app-gateway-page .paramour-gateway-scroll-down .paramour-gateway-scroll-dots {
		animation: none !important;
	}

	body.paramour-pre-app-gateway-page .paramour-gateway-scroll-top {
		transition: none !important;
	}
}
