/*
 * History - Intro.
 *
 * Read from cp-all-designer about-us/about-cp-all/history/ (section history-intro, .abtin--split) and css/about-us.css:73-192, 424-441. What the Style tab sets arrives through
 * the widget's selectors; a size left empty there scales the way the
 * design's does.
 */
.custom-history-intro {
	--custom-vwu: 14.4px;
	--custom-vhu: clamp(5.2px, 1svh, 9px);
	--custom-pad: 90px;
	--custom-rhythm: min(clamp(52px, calc(8.6 * var(--custom-vwu)), 160px), calc(13.7 * var(--custom-vhu)));
	--custom-gap: min(clamp(32px, calc(4.5 * var(--custom-vwu)), 64px), calc(4.4 * var(--custom-vhu)));
	--custom-pair-gap: clamp(28px, calc(3.6 * var(--custom-vwu)), 60px);
	--custom-curl: clamp(56px, calc(6 * var(--custom-vwu)), 96px);
	--custom-curl-sm: clamp(30px, calc(3.2 * var(--custom-vwu)), 50px);
	--custom-sh: 0 18px 44px -14px rgba(22, 65, 140, 0.2);
	--custom-sh-lg: 0 34px 80px -20px rgba(22, 65, 140, 0.3);
	--custom-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	position: relative;
	display: block;
	box-sizing: border-box;
	overflow: hidden;
	/* app.css:385-389 .sec--rhythm, .container --pad */
	padding: var(--custom-rhythm) var(--custom-pad);
	letter-spacing: normal;
	--custom-curl-r: 120px;
	background: #FFFFFF;
	font-size: 16px;
	line-height: 1.6;
}

@media (max-width: 1280px) { .custom-history-intro { --custom-vwu: 12.2px; --custom-vhu: clamp(5.2px, 1svh, 8.5px); } }
@media (max-width: 1200px) { .custom-history-intro { --custom-vwu: 11.2px; --custom-vhu: clamp(5.2px, 1svh, 8.35px); } }
@media (max-width: 1024px) { .custom-history-intro { --custom-vwu: 9.2px; --custom-vhu: clamp(5.2px, 1svh, 8px); --custom-pad: 40px; } }
@media (max-width: 860px)  { .custom-history-intro { --custom-vwu: 7.7px; --custom-vhu: clamp(5.2px, 1svh, 7.8px); } }
@media (max-width: 640px)  { .custom-history-intro { --custom-vwu: 4.2px; --custom-vhu: clamp(5.2px, 1svh, 7.6px); --custom-pad: 24px; } }
@media (max-width: 380px)  { .custom-history-intro { --custom-vwu: 3.6px; --custom-vhu: clamp(5.2px, 1svh, 7.2px); } }

.custom-history-intro *,
.custom-history-intro *::before,
.custom-history-intro *::after {
	box-sizing: border-box;
}

.custom-history-intro .nb {
	white-space: nowrap;
}

@media (max-width: 600px) { .custom-history-intro { --custom-curl-r: 70px; } }   /* app.css --shape-r */

.custom-history-intro__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
}

/* about-us.css:136 — the rows a little closer than a full rhythm */
.custom-history-intro__rows {
	display: grid;
	gap: calc(var(--custom-rhythm) * 0.8);
}

/* about-us.css:134-135 */
.custom-history-intro__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: var(--custom-pair-gap);
	align-items: center;
}

.custom-history-intro__grid--flip {
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.custom-history-intro__grid--flip .custom-history-intro__visual {
	order: -1;
}

.custom-history-intro__copy,
.custom-history-intro__visual {
	min-width: 0;
}

/* about-us.css:87-92, 138 */
.custom-history-intro__p {
	max-width: 72ch;
	margin: 0 0 18px;
	font-size: clamp(16px, calc(1.25 * var(--custom-vwu)), 18px);
	font-weight: 300;
	line-height: 1.75;
	letter-spacing: normal;
	color: #475569;
}

.custom-history-intro__p:last-of-type {
	margin-bottom: 0;
}

/* app.css:304-315 .btn .btn--navy, about-us.css:100 .abtin__cta */
.custom-history-intro__button {
	--custom-press-ground: #16418C;
	--custom-press-ink: #FFFFFF;
	--custom-press-edge: transparent;
	display: inline-flex;
	align-items: center;
	gap: 11px;
	margin-top: clamp(26px, calc(3 * var(--custom-vwu)), 40px);
	padding: 15px 30px;
	border-width: 1.5px;
	border-style: solid;
	border-radius: 16px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	transition: all 250ms var(--custom-ease);
}

.custom-history-intro__button:hover {
	--custom-press-ground: #50A3D5;
	--custom-press-shadow: 0 14px 30px rgba(80, 163, 213, 0.30);
	transform: translateY(-2px);
}

.custom-history-intro__button:focus-visible {
	outline: 2px solid #50A3D5;
	outline-offset: 3px;
}

/* about-us.css:107-110, 119, 137 — the house frame, a fixed height */
.custom-history-intro__frame {
	position: relative;
	overflow: hidden;
	height: clamp(340px, calc(30 * var(--custom-vwu)), 460px);
	border-radius: var(--custom-curl-r) 0 var(--custom-curl-r) 0;
	background: #F0F4FA;
	box-shadow: var(--custom-sh-lg);
}

.custom-history-intro__grid--flip .custom-history-intro__frame {
	border-radius: 0 var(--custom-curl-r) 0 var(--custom-curl-r);
}

.custom-history-intro__frame img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

/* about-us.css:145-174 — three filled leaves behind the rows */
.custom-history-intro__leaf {
	position: absolute;
	z-index: 0;
	height: auto;
	pointer-events: none;
}

.custom-history-intro__leaf path {
	fill: currentColor;
	stroke: none;
}

.custom-history-intro__leaf--a {
	top: -64px;
	left: -72px;
	width: clamp(120px, calc(15 * var(--custom-vwu)), 230px);
	color: #50A3D5;
	opacity: 0.12;
}

.custom-history-intro__leaf--b {
	top: clamp(20px, calc(3 * var(--custom-vwu)), 48px);
	right: 2%;
	width: clamp(90px, calc(11 * var(--custom-vwu)), 170px);
	color: #5CA13F;
	opacity: 0.16;
	transform: rotate(28deg);
}

.custom-history-intro__leaf--c {
	bottom: clamp(20px, calc(4 * var(--custom-vwu)), 60px);
	left: -64px;
	width: clamp(105px, calc(14 * var(--custom-vwu)), 205px);
	color: #CE2929;
	opacity: 0.1;
	transform: rotate(180deg);
}

/* about-us.css:428-438 — one column, the picture first, 16:9 */
@media (max-width: 1000px) {
	.custom-history-intro__grid,
	.custom-history-intro__grid--flip {
		grid-template-columns: minmax(0, 1fr);
		gap: clamp(24px, calc(4 * var(--custom-vwu)), 40px);
	}

	.custom-history-intro__visual {
		order: -1;
	}

	.custom-history-intro__frame {
		height: auto;
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 640px) {
	.custom-history-intro__leaf--b { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.custom-history-intro__button { transition: none; }
	.custom-history-intro__button:hover { transform: none; }
}

/* the design wraps text plainly; some themes set "pretty" wrapping on
   paragraphs, which moves Thai line breaks */
.custom-history-intro p,
.custom-history-intro h2,
.custom-history-intro h3,
.custom-history-intro li,
.custom-history-intro dt,
.custom-history-intro dd,
.custom-history-intro span {
	text-wrap: wrap;
	text-rendering: optimizeLegibility;
}
