/*
 * History - Brand.
 *
 * Read from cp-all-designer about-us/about-cp-all/history/ (section history-brand, .abhbrand) and css/about-us-history.css:20-27, 660-760, 870-880. 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-brand {
	--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-sh-sm: 0 6px 18px -6px rgba(22, 65, 140, 0.14);
	background: #FFFFFF;
	font-size: 16px;
	line-height: 1.6;
}

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

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

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

/* ------------------------------------------------------------------ */
/* The head — app.css:230-252 (.h-sec), 291-294 (.lead), 404           */
/* ------------------------------------------------------------------ */

.custom-history-brand__head {
	max-width: 900px;
	margin: 0 auto var(--custom-gap);
	font-size: 16px;
	line-height: 1.6;
	text-align: center;
}

.custom-history-brand__title {
	margin: 0;
	padding: 0;
	font-size: min(clamp(28px, calc(3.9 * var(--custom-vwu)), 56px), calc(6.2 * var(--custom-vhu)));
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	text-wrap: wrap;
	color: #16418C;
}

.custom-history-brand__title strong { font-weight: 700; }

.custom-history-brand__title em {
	position: relative;
	display: inline-block;
	font-style: italic;
	font-weight: 700;
	color: #50A3D5;
}

.custom-history-brand__title em::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.06em;
	height: 0.16em;
	border-radius: 3px;
	background: currentColor;
	opacity: 0.18;
}

.custom-history-brand [data-custom-sweep-ghost] em::after { opacity: 0.12; }

.custom-history-brand__intro {
	max-width: 870px;
	margin: min(22px, calc(2.4 * var(--custom-vhu))) 0 0;
	font-size: clamp(16px, calc(1.25 * var(--custom-vwu)), 18px);
	font-weight: 400;
	line-height: 1.7;
	color: #475569;
}

@media (max-width: 640px) {
	.custom-history-brand__title { font-size: clamp(22px, calc(6.2 * var(--custom-vwu)), 56px); }
	.custom-history-brand__intro { margin-top: 14px; font-size: 14px; line-height: 1.5; }
}

/* about-us-history.css:26 — held to the 1440 artboard */
.custom-history-brand__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: calc(1440px - 2 * var(--custom-pad));
	margin: 0 auto;
}

.custom-history-brand__shape {
	position: absolute;
	z-index: 0;
	height: auto;
	color: #50A3D5;
	pointer-events: none;
}

.custom-history-brand__shape path {
	stroke-width: 8;
	vector-effect: none;
}

.custom-history-brand__shape--a {
	top: -40px;
	left: -56px;
	width: clamp(110px, calc(11 * var(--custom-vwu)), 165px);
	opacity: 0.16;
}

.custom-history-brand__shape--b {
	bottom: -90px;
	right: -70px;
	width: clamp(190px, calc(21 * var(--custom-vwu)), 300px);
	opacity: 0.22;
	transform: rotate(180deg);
}

.custom-history-brand__mark {
	display: grid;
	place-items: center;
	margin: 0 0 clamp(22px, calc(2.6 * var(--custom-vwu)), 36px);
}

.custom-history-brand__mark img {
	display: block;
	width: min(260px, 62%);
	height: auto;
	margin: 0;
}

/* about-us-history.css:705-760 — the two concepts, solid brand panels */
.custom-history-brand__concepts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(16px, calc(1.8 * var(--custom-vwu)), 28px);
	max-width: 900px;
	margin: 0 auto;
}

.custom-history-brand__concept {
	--custom-ct: #50A3D5;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(30px, calc(3.4 * var(--custom-vwu)), 50px) clamp(24px, calc(2.8 * var(--custom-vwu)), 44px);
	text-align: center;
	background: var(--custom-ct);
	color: #FFFFFF;
	border-radius: var(--custom-curl-sm) 4px var(--custom-curl-sm) 4px;
	box-shadow: var(--custom-sh-sm);
	transition: transform 0.35s var(--custom-ease), box-shadow 0.35s var(--custom-ease);
}

.custom-history-brand__concept::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(96% 130% at 88% 0%, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0) 62%);
}

.custom-history-brand__concept:hover {
	transform: translateY(-6px);
	box-shadow: var(--custom-sh);
}

.custom-history-brand__tag {
	display: inline-block;
	margin: 0 0 clamp(16px, calc(1.8 * var(--custom-vwu)), 22px);
	padding: 6px 14px 7px;
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 16px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #FFFFFF;
}

.custom-history-brand__en {
	margin: 0;
	font-size: clamp(20px, calc(1.6 * var(--custom-vwu)), 26px);
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.005em;
	color: #FFFFFF;
	text-wrap: balance;
}

.custom-history-brand__th {
	margin: 10px 0 0;
	font-size: clamp(16px, calc(1.2 * var(--custom-vwu)), 18px);
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	text-wrap: balance;
}

@media (max-width: 999px) {
	.custom-history-brand__mark img { width: min(230px, 70%); }
}

@media (max-width: 699px) {
	.custom-history-brand__concepts { grid-template-columns: minmax(0, 1fr); }
	.custom-history-brand__tag { padding-left: 12px; padding-right: 12px; font-size: 10px; letter-spacing: 0.07em; }
}

@media (max-width: 620px) {
	.custom-history-brand__mark img { width: min(200px, 76%); }
}

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

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