/*
 * Realestech · The Realestech Ecosystem page (2.4.0).
 * Loaded only on /ecosystem/, after figma-pages.css.
 */

/* ------------------------------------------------------------------------- */
/* Hero                                                                      */
/* ------------------------------------------------------------------------- */

.ec-hero {
	padding-top: 160px;
	padding-bottom: var(--space-section);
	background: #fff;
}

.ec-hero__inner {
	display: flex;
	align-items: center;
	gap: 64px;
}

.ec-hero__copy {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.ec-hero__copy .fp-body { max-width: 52em; }

.ec-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
}

.ec-hero__media {
	position: relative;
	flex: 0 1 588px;
	min-width: 0;
	width: 100%;
	max-width: 588px;
	aspect-ratio: 588 / 640;
	overflow: hidden;
	background: #e4e1da;
}

.ec-hero__video,
.ec-hero__fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ec-hero__fallback { z-index: 0; }
.ec-hero__video { z-index: 1; }

/* ------------------------------------------------------------------------- */
/* Shared intro                                                              */
/* ------------------------------------------------------------------------- */

.ec-intro {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	max-width: 792px;
	margin-bottom: 64px;
}

.ec-intro__lead { max-width: 640px; }

/* ------------------------------------------------------------------------- */
/* What is the ecosystem                                                     */
/* ------------------------------------------------------------------------- */

.ec-what { background: var(--color-surface-warm); }

.ec-what__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 64px;
	align-items: start;
}

.ec-what__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.ec-what__copy {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-top: 36px;
}

/* ------------------------------------------------------------------------- */
/* Four businesses                                                           */
/* ------------------------------------------------------------------------- */

.ec-businesses {
	background: #fff;
	scroll-margin-top: 96px;
}

.ec-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 24px;
}

.ec-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 40px 36px 36px;
	background: var(--color-surface-warm);
	--ec-accent: var(--color-brand-navy);
}

.ec-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 40px;
	height: 4px;
	background: var(--ec-accent);
}

.ec-card--academy { --ec-accent: #fec91a; }
.ec-card--agentnexa { --ec-accent: #ff7439; }
.ec-card--proxima { --ec-accent: #19248e; }
.ec-card--rigelnexa { --ec-accent: #573bba; }

.ec-card__brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: 100%;
}

.ec-card__logo { height: 28px; width: auto; }
.ec-card--rigelnexa .ec-card__logo { height: 32px; }

.ec-card__kicker { color: var(--ec-accent); }

.ec-card__bullets {
	width: 100%;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.ec-card__bullets li {
	position: relative;
	padding: 12px 0 12px 18px;
	border-top: 1px solid var(--color-line-default);
	font: 400 15px/24px var(--font-body);
	color: var(--color-text-body);
}

.ec-card__bullets li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 20px;
	width: 6px;
	height: 6px;
	background: var(--ec-accent);
}

.ec-card .fp-link { margin-top: auto; }

/* ------------------------------------------------------------------------- */
/* How the ecosystem works                                                   */
/* ------------------------------------------------------------------------- */

.ec-how { background: var(--color-surface-warm); }

.ec-panels {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 24px;
}

.ec-panel {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 48px 40px;
	background: #fff;
}

.ec-panel--alt {
	background: var(--color-brand-navy);
}

.ec-panel--alt .fp-h4,
.ec-panel--alt .fp-label { color: #fff; }

.ec-panel--alt .fp-body { color: rgba(255, 255, 255, .75); }

.ec-panel--alt .ec-panel__kicker { color: var(--color-brand-aqua); }

/* ------------------------------------------------------------------------- */
/* Why Realestech                                                            */
/* ------------------------------------------------------------------------- */

.ec-why { background: #fff; }

.ec-why__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px 32px;
}

.ec-why__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	padding-top: 28px;
	border-top: 1px solid var(--color-brand-navy);
}

/* ------------------------------------------------------------------------- */
/* CTA band                                                                  */
/* ------------------------------------------------------------------------- */

.ec-cta {
	padding: var(--space-section) 0;
	background: #232c6e;
	color: #fff;
}

.ec-cta__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 24px;
}

.ec-cta__title {
	max-width: 792px;
	color: #fff;
}

.ec-cta__body {
	max-width: 640px;
	font: 400 16px/26.4px var(--font-body);
	color: rgba(255, 255, 255, .75);
}

.ec-cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 16px;
}

.ec-cta__btn {
	background: #fff;
	border-color: #fff;
	color: var(--color-brand-navy) !important;
}

.ec-cta__btn:hover {
	background: var(--color-surface-warm);
	border-color: var(--color-surface-warm);
}

.ec-cta .ec-cta__btn-outline {
	background: transparent;
	border-color: rgba(255, 255, 255, .45);
	color: #fff !important;
}

.ec-cta .ec-cta__btn-outline:hover {
	background: rgba(255, 255, 255, .08);
	border-color: #fff;
}

/* ------------------------------------------------------------------------- */
/* FAQ accordion                                                             */
/* ------------------------------------------------------------------------- */

.ec-faq { background: #fff; }

.ec-faq__list { max-width: 920px; }

.ec-faq__item { border-top: 1px solid var(--color-line-default); }

.ec-faq__item:last-child { border-bottom: 1px solid var(--color-line-default); }

.ec-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 28px 0;
	cursor: pointer;
	list-style: none;
	font: 400 20px/1.3 var(--font-heading);
	letter-spacing: -.3px;
	color: var(--color-brand-navy);
}

.ec-faq__item summary::-webkit-details-marker { display: none; }
.ec-faq__item summary::marker { content: none; display: none; }

.ec-faq__icon {
	flex: none;
	width: 12px;
	height: 12px;
	transition: transform .2s ease;
}

.ec-faq__item[open] .ec-faq__icon { transform: rotate(180deg); }

.ec-faq__item p {
	margin: 0;
	padding: 0 48px 28px 0;
	max-width: 720px;
}

@media (prefers-reduced-motion: reduce) {
	.ec-faq__icon { transition: none; }
}

/* ------------------------------------------------------------------------- */
/* Responsive                                                                */
/* ------------------------------------------------------------------------- */

@media (max-width: 1023px) {
	.ec-hero { padding-top: 128px; }

	.ec-hero__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 40px;
	}

	.ec-hero__media {
		flex-basis: auto;
		max-width: none;
		aspect-ratio: 16 / 10;
	}

	.ec-what__inner,
	.ec-why__grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.ec-what__copy { padding-top: 0; }

	.ec-intro { margin-bottom: 40px; }
}

@media (max-width: 767px) {
	.ec-hero { padding-top: 108px; }

	.ec-hero__actions,
	.ec-cta__actions {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.ec-hero__actions .fh-btn,
	.ec-cta__actions .fh-btn {
		justify-content: center;
		width: 100%;
	}

	.ec-cards,
	.ec-panels { grid-template-columns: 1fr; }

	.ec-card,
	.ec-panel { padding: 28px 24px; }

	.ec-card::before { right: 24px; }

	.ec-faq__item summary { font-size: 18px; padding: 22px 0; }
}
