/* ------------------------------------------------------------------ Pop-up */
/*
 * Site pop-up standard (Landing layer), approved 2026-10-17.
 * One anatomy, three formats: top bar (in flow), mid-page modal (on a scrim), corner (no scrim).
 * Below 746px the modal and corner become a full-width bottom sheet.
 * The CTA reuses .ascend-btn but fills with ascend-blue-deep for 4.6:1 white text.
 */

.ascend-popup {
	position: relative;
	box-sizing: border-box;
	background: var(--surface-0);
	font-family: var(--font-body);
	color: var(--fg-2);
	-webkit-font-smoothing: antialiased;
}
.ascend-popup *, .ascend-popup *::before, .ascend-popup *::after { box-sizing: border-box; }
.ascend-popup p { margin: 0; }

.ascend-popup__inner { display: flex; flex-direction: column; gap: 16px; }

.ascend-popup__eyebrow {
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 2.4px;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--ascend-home-blue-text);
}

.ascend-popup__title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 32px;
	line-height: 1.1;
	letter-spacing: -0.5px;
	text-transform: uppercase;
	text-wrap: balance;
	color: var(--fg-1);
}

/* The 2 to 5 words that carry the value. Large text only (22px+), 3.15:1 passes the 3:1 floor. */
.ascend-popup__hl { color: var(--ascend-blue); }

.ascend-popup__body { font-size: 17px; line-height: 1.6; color: var(--fg-5); }
.ascend-popup__body strong { color: var(--fg-2); font-weight: 700; }

.ascend-popup__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 8px; }

.ascend-btn.ascend-popup__cta {
	min-height: 52px;
	padding: 0 32px;
	background: var(--ascend-blue-deep);
	border-color: var(--ascend-blue-deep);
	color: var(--ascend-white);
}
.ascend-btn.ascend-popup__cta:hover,
.ascend-btn.ascend-popup__cta:focus-visible {
	background: var(--ascend-home-blue-text);
	border-color: var(--ascend-home-blue-text);
	color: var(--ascend-white);
}

.ascend-popup__dismiss {
	min-height: 44px;
	padding: 0 12px;
	border: 0;
	background: transparent;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 600;
	color: var(--fg-5);
	cursor: pointer;
}
.ascend-popup__dismiss:hover { color: var(--fg-2); }

.ascend-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--fg-6);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.ascend-popup__close:hover { color: var(--fg-2); }
.ascend-popup__close svg { width: 22px; height: 22px; }

.ascend-popup__fine { font-size: 13px; line-height: 1.5; color: var(--fg-6); }

.ascend-popup__close:focus-visible,
.ascend-popup__dismiss:focus-visible,
.ascend-popup a:focus-visible {
	outline: 3px solid var(--ascend-home-blue-text);
	outline-offset: 3px;
	border-radius: 6px;
}

/* The 3px Celestial Blue rule on the bottom edge of every format. */
.ascend-popup::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var(--ascend-blue);
}

/* 1. Top bar: in flow above the site header; not modal. */
.ascend-popup--bar {
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 24px 48px 27px;
}
.ascend-popup--bar .ascend-popup__inner { flex: 1 1 auto; min-width: 0; gap: 6px; }
.ascend-popup--bar .ascend-popup__title { font-size: 30px; }
.ascend-popup--bar .ascend-popup__body { font-size: 18px; line-height: 1.45; }
.ascend-popup--bar .ascend-popup__actions { flex: none; margin-top: 0; }
.ascend-popup--bar .ascend-popup__close { position: static; flex: none; }

/* 2. Mid-page modal: centred on the scrim, traps focus. */
.ascend-popup-scrim {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var(--scrim);
}
.ascend-popup--modal {
	width: 100%;
	max-width: 560px;
	padding: 40px 40px 39px;
	border-radius: var(--r-lg);
	overflow: hidden;
	box-shadow: var(--shadow-card-hover);
}

/* 3. Corner: bottom right, no scrim, never takes focus. */
.ascend-popup--corner {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1000;
	width: 400px;
	max-width: calc(100vw - 48px);
	padding: 28px 28px 27px;
	border: 1px solid var(--ascend-home-line);
	border-radius: var(--r-lg);
	overflow: hidden;
	box-shadow: var(--shadow-card-hover);
}
.ascend-popup--corner .ascend-popup__inner { gap: 12px; }
.ascend-popup--corner .ascend-popup__title { font-size: 22px; line-height: 1.15; letter-spacing: -0.3px; padding-right: 28px; }
.ascend-popup--corner .ascend-popup__body { font-size: 15px; line-height: 1.55; }
.ascend-popup--corner .ascend-popup__actions { gap: 8px; margin-top: 4px; }
.ascend-popup--corner .ascend-btn.ascend-popup__cta { min-height: 44px; padding: 0 24px; font-size: 13px; }
.ascend-popup--corner .ascend-popup__dismiss { font-size: 14px; }
.ascend-popup--corner .ascend-popup__close { top: 8px; right: 8px; }
.ascend-popup--corner .ascend-popup__close svg { width: 20px; height: 20px; }

/* Entrance: 200ms fade and 8px rise. Add .is-open when shown. */
.ascend-popup--modal,
.ascend-popup--corner {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 200ms cubic-bezier(0.22, 1, 0.36, 1), transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ascend-popup--modal.is-open,
.ascend-popup--corner.is-open { opacity: 1; transform: none; }

/* 4. Phones: the bar drops its body, the modal and corner become a bottom sheet. */
@media (max-width: 745px) {
	.ascend-popup--bar { flex-wrap: wrap; gap: 12px 16px; padding: 16px 20px 19px; }
	.ascend-popup--bar .ascend-popup__title { font-size: 18px; }
	.ascend-popup--bar .ascend-popup__body { display: none; }
	.ascend-popup--bar .ascend-btn.ascend-popup__cta { min-height: 44px; padding: 0 20px; font-size: 13px; }

	.ascend-popup-scrim { align-items: flex-end; padding: 0; }
	.ascend-popup--modal,
	.ascend-popup--corner {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-width: none;
		padding: 28px 20px 27px;
		border: 0;
		border-radius: var(--r-lg) var(--r-lg) 0 0;
	}
	.ascend-popup--modal .ascend-popup__inner,
	.ascend-popup--corner .ascend-popup__inner { gap: 12px; }
	.ascend-popup--modal .ascend-popup__title,
	.ascend-popup--corner .ascend-popup__title { font-size: 24px; line-height: 1.12; padding-right: 32px; }
	.ascend-popup--modal .ascend-popup__body,
	.ascend-popup--corner .ascend-popup__body { font-size: 16px; line-height: 1.55; }
	.ascend-popup--modal .ascend-popup__actions,
	.ascend-popup--corner .ascend-popup__actions { flex-direction: column; align-items: stretch; gap: 4px; }
	.ascend-popup--modal .ascend-btn.ascend-popup__cta,
	.ascend-popup--corner .ascend-btn.ascend-popup__cta { justify-content: center; min-height: 52px; font-size: 15px; }
	.ascend-popup--modal .ascend-popup__close,
	.ascend-popup--corner .ascend-popup__close { top: 8px; right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.ascend-popup--modal,
	.ascend-popup--corner { transition: none; transform: none; }
}
