/**
 * Case Study (RISE) -- page-scoped stylesheet for
 * page-templates/template-case-study-rise.php (template-parts/case-study-rise/).
 *
 * A different layout from the standard case study, but the same type
 * scale, colors and spacing (see case-study.css): #0f172a headings at
 * 48px/58px (30px on tablet + mobile), #64748b body text at 18px/28px
 * (16px/26px on tablet + mobile), 96/64/48px section padding, 1280px
 * content width, 'Geist' throughout. Loaded only for this template --
 * see inc/enqueue/styles.php.
 */

/* ==========================================================================
   Shared: section padding, content width, labels, pills
   ========================================================================== */

.csr-hero,
.csr-about,
.csr-scope,
.csr-integration,
.csr-arch,
.csr-res {
	position: relative;
	padding: 96px var(--header-padding-x);
	font-family: 'Geist', sans-serif;
}

@media (max-width: 1024px) {
	.csr-hero,
	.csr-about,
	.csr-scope,
	.csr-integration,
	.csr-arch,
	.csr-res {
		padding: 64px var(--header-padding-x-tablet);
	}
}

@media (max-width: 640px) {
	.csr-hero,
	.csr-about,
	.csr-scope,
	.csr-integration,
	.csr-arch,
	.csr-res {
		padding: 48px var(--header-padding-x-mobile);
	}
}

.csr-hero__inner,
.csr-about__inner,
.csr-scope__inner,
.csr-integration__inner,
.csr-arch__inner,
.csr-res__inner {
	position: relative;
	max-width: var(--header-max-width);
	margin-inline: auto;
}

/* Section headings -- same scale as the standard case study. */
.csr-about__heading,
.csr-scope__heading,
.csr-integration__heading,
.csr-arch__heading,
.csr-res__heading {
	margin: 0 0 16px;
	font-weight: 700;
	font-size: 48px;
	line-height: 58px;
	letter-spacing: 0;
	color: #0f172a;
}

@media (max-width: 1024px) {
	.csr-about__heading,
	.csr-scope__heading,
	.csr-integration__heading,
	.csr-arch__heading,
	.csr-res__heading {
		font-size: 30px;
		line-height: 1.25;
	}
}

/* Body copy. */
.csr-hero__description,
.csr-about__paragraph,
.csr-scope__description,
.csr-integration__text,
.csr-arch__subheading,
.csr-res__text {
	margin: 0;
	font-weight: 400;
	font-size: 18px;
	line-height: 28px;
	letter-spacing: 0;
	color: #64748b;
}

@media (max-width: 1024px) {
	.csr-hero__description,
	.csr-about__paragraph,
	.csr-scope__description,
	.csr-integration__text,
	.csr-arch__subheading,
	.csr-res__text {
		font-size: 16px;
		line-height: 26px;
	}
}

/* Small blue sub-labels ("Objectives", "Integrations", "Technical Architecture"). */
.csr-label {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 600;
	line-height: 28px;
	color: #004195;
}

/* Pill lists. */
.csr-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.csr-pills--start {
	justify-content: flex-start;
}

.csr-pills__item {
	padding: 12px 16px;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 500;
	line-height: 16px;
	text-align: center;
}

/* White pills on the light-blue band (Locations). */
.csr-pills--light .csr-pills__item {
	min-width: 200px;
	background-color: #fff;
	box-shadow: 0 2px 12px rgba(0, 65, 149, 0.08);
	color: #0f172a;
}

/* Navy pills (Process areas). */
.csr-pills--dark .csr-pills__item {
	min-width: 260px;
	background-color: #004195;
	color: #fff;
}

/* Light-blue pills on white (Integrations). */
.csr-pills--soft .csr-pills__item {
	min-width: 96px;
	padding: 12px 16px;
	border: 1px solid rgba(1, 174, 240, 0.15);
	background-color: #e6f7fe;
	font-size: 16px;
	font-weight: 500;
	line-height: 16px;
	color: #0f172a;
}

@media (max-width: 640px) {
	.csr-pills {
		gap: 10px;
	}

	.csr-pills__item {
		padding: 9px 16px;
		font-size: 13px;
	}

	.csr-pills--light .csr-pills__item,
	.csr-pills--dark .csr-pills__item,
	.csr-pills--soft .csr-pills__item {
		min-width: 0;
	}
}

/* ==========================================================================
   Hero
   ========================================================================== */

.csr-hero {
	background-color: #fff;
}

.csr-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: center;
	gap: 56px;
}

.csr-hero__heading {
	margin: 0 0 20px;
	font-weight: 700;
	font-size: 48px;
	line-height: 58px;
	letter-spacing: 0;
	color: #0f172a;
}

.csr-hero__media {
	position: relative;
}

.csr-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 420px;
	object-fit: cover;
	border-radius: 20px;
}

.csr-hero__image--placeholder {
	background: linear-gradient(135deg, #dbeafe 0%, #e2e8f0 100%);
}

.csr-hero__badge {
	position: absolute;
	display: flex;
	align-items: center;
}

/* White pill hanging off the top-right corner. */
.csr-hero__badge--top {
	top: 40px;
	right: -60px;
	gap: 12px;
	padding: 12px 16px;
	border: 1px solid #e6ecf5;
	border-radius: 999px;
	background-color: #fff;
	box-shadow: 0 8px 40px rgba(0, 102, 255, 0.13);
}

.csr-hero__badge-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 50%;
	color: #fff;
	background: linear-gradient(135deg, #004195 0%, #01aef0 100%);
}

.csr-hero__badge-icon svg,
.csr-hero__badge-icon img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.csr-hero__badge-text {
	font-size: 16px;
	font-weight: 600;
	line-height: 20px;
	color: #0f172a;
}

/* Navy client card hanging off the bottom-left corner. */
.csr-hero__badge--bottom {
	left: -50px;
	bottom: -50px;
	max-width: min(320px, calc(100% - 24px));
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	border-radius: 16px;
	background-color: #004195;
	box-shadow: 0 8px 40px rgba(0, 102, 255, 0.13);
}

.csr-hero__badge-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	color: #fff;
}

.csr-hero__badge-tag {
	padding: 5px 12px;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.14);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	color: #fff;
}

@media (max-width: 1024px) {
	.csr-hero__inner {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.csr-hero__heading {
		font-size: 40px;
		line-height: 1.25;
	}

	/* Badges sit just inside the photo once it's narrower. */
	.csr-hero__badge--top {
		top: 16px;
		right: 16px;
	}

	.csr-hero__badge--bottom {
		left: 16px;
		bottom: 16px;
		max-width: calc(100% - 32px);
	}
}

@media (max-width: 640px) {
	.csr-hero__image {
		min-height: 280px;
	}

	.csr-hero__badge--top {
		top: 12px;
		right: 12px;
		padding: 8px 14px 8px 8px;
	}

	.csr-hero__badge-text {
		font-size: 12px;
	}

	.csr-hero__badge--bottom {
		left: 12px;
		bottom: 12px;
		max-width: calc(100% - 24px);
	}

	.csr-hero__badge-title {
		font-size: 14px;
	}
}

/* ==========================================================================
   Company intro
   ========================================================================== */

.csr-about {
	background-color: #f8fafc;
}

.csr-about__inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: center;
	gap: 56px;
}

.csr-about__heading {
	margin-bottom: 20px;
}

.csr-about__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 360px;
	object-fit: cover;
	border-radius: 20px;
}

.csr-about__image--placeholder {
	background: linear-gradient(135deg, #dbeafe 0%, #e2e8f0 100%);
}

.csr-about__paragraph + .csr-about__paragraph {
	margin-top: 16px;
}

@media (max-width: 1024px) {
	.csr-about__inner {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	/* Text first, photo below, same as the standard case study. */
	.csr-about__media {
		order: 2;
	}
}

@media (max-width: 640px) {
	.csr-about__image {
		min-height: 240px;
	}
}

/* ==========================================================================
   RISE with SAP Scope (light-blue band)
   ========================================================================== */

.csr-scope {
	background-color: #eef6ff;
	text-align: center;
}

.csr-scope__description {
	margin: 0 auto;
}

.csr-scope__group {
	margin-top: 48px;
}

.csr-scope__group + .csr-scope__group {
	margin-top: 55px;
}

.csr-scope__label {
	margin: 0 0 20px;
	font-size: 18px;
	font-weight: 700;
	line-height: 24px;
	color: #0f172a;
}

@media (max-width: 640px) {
	.csr-scope__group {
		margin-top: 32px;
	}

	.csr-scope__group + .csr-scope__group {
		margin-top: 28px;
	}

	.csr-scope__label {
		margin-bottom: 14px;
		font-size: 16px;
	}
}

/* ==========================================================================
   Integration Scope (two columns)
   ========================================================================== */

.csr-integration {
	background-color: #fff;
}

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

.csr-integration__heading {
	margin-bottom: 24px;
}

.csr-integration__systems .csr-integration__text {
	margin-bottom: 20px;
}

@media (max-width: 1024px) {
	.csr-integration__inner {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

/* ==========================================================================
   Integration Technical Architecture (dark)
   ========================================================================== */

.csr-arch {
	z-index: 0;
	overflow: hidden;
	background: radial-gradient(circle at 15% 0%, #163258 0%, #0b1a33 45%, #060f1f 100%);
}

.csr-arch__header {
	margin-bottom: 48px;
	text-align: center;
}

.csr-arch__heading {
	margin: 0;
	color: #fff;
}

.csr-arch__subheading {
	margin: 16px auto 0;
	color: #94a3b8;
}

/* Flex so a part-filled last row is centered. */
.csr-arch__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}

.csr-arch__card {
	flex: 0 0 calc((100% - 48px) / 3);
	box-sizing: border-box;
	min-width: 0;
	padding: 32px 28px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	background-color: rgba(255, 255, 255, 0.06);
}

.csr-arch__card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-bottom: 20px;
	box-sizing: border-box;
	border: 1px solid rgba(1, 174, 240, 0.1);
	border-radius: 8px;
	color: #01aef0;
	background: linear-gradient(135deg, rgba(0, 65, 149, 0.08) 0%, rgba(1, 174, 240, 0.06) 100%);
}

.csr-arch__card-icon svg,
.csr-arch__card-icon img {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.csr-arch__card-title {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 700;
	line-height: 28px;
	color: #fff;
}

.csr-arch__card-description {
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 26px;
	color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1024px) {
	.csr-arch__grid {
		gap: 20px;
	}

	.csr-arch__card {
		flex-basis: calc((100% - 20px) / 2);
	}
}

@media (max-width: 640px) {
	.csr-arch__header {
		margin-bottom: 32px;
	}

	.csr-arch__card {
		flex-basis: 100%;
		padding: 28px 24px;
	}
}

/* ==========================================================================
   Data Residency Scope
   ========================================================================== */

.csr-res {
	overflow: hidden;
	background:
		radial-gradient(circle at 92% 8%, rgba(1, 174, 240, 0.16) 0%, rgba(1, 174, 240, 0) 38%),
		#f8fafc;
}

.csr-res__intro {
	margin-bottom: 48px;
}

.csr-res__heading {
	margin-bottom: 24px;
}

/* Diagram: box <-> box <-> box. */
.csr-res__diagram {
	display: flex;
	/* Equal-height boxes, arrows centered between them. */
	align-items: stretch;
	justify-content: center;
	gap: 16px;
	margin-bottom: 48px;
}

.csr-res__box {
	display: flex;
	flex: 0 1 300px;
	flex-direction: column;
	gap: 6px;
	box-sizing: border-box;
	min-width: 0;
	padding: 20px 24px;
	border-radius: 16px;
	background-color: #004195;
	box-shadow: 0 12px 32px -18px rgba(0, 65, 149, 0.6);
	color: #fff;
}

.csr-res__box-label {
	font-size: 10px;
	font-weight: 400;
	line-height: 16px;
	color: #fff;
}

.csr-res__box-title {
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
}

.csr-res__box-subtitle {
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	color: #fff;
}

/* Center box: white with a navy outline. */
.csr-res__box--center {
	border: 1px solid #004195;
	background-color: #fff;
	color: #0f172a;
}

.csr-res__box--center .csr-res__box-title {
	border-bottom-color: #e6ecf5;
}

.csr-res__box--center .csr-res__box-subtitle {
	color: #64748b;
}

.csr-res__arrow {
	display: inline-flex;
	align-self: center;
	flex-shrink: 0;
	width: 48px;
	color: #004195;
}

.csr-res__arrow svg {
	width: 100%;
	height: auto;
}

/* Detail cards. */
.csr-res__cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}

.csr-res__card {
	flex: 0 0 calc((100% - 24px) / 2);
	box-sizing: border-box;
	min-width: 0;
	padding: 24px;
	border: 1px solid #e6ecf5;
	border-radius: 16px;
	background-color: #fff;
	box-shadow: 0 8px 40px rgba(0, 102, 255, 0.13);
}

.csr-res__card-title {
	margin: 0 0 16px;
	font-size: 22px;
	font-weight: 700;
	line-height: 28px;
	color: #0f172a;
}

.csr-res__card-description {
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 26px;
	color: #64748b;
}

@media (max-width: 1024px) {
	.csr-res__intro,
	.csr-res__diagram {
		margin-bottom: 40px;
	}

	.csr-res__box {
		padding: 18px 20px;
	}

	.csr-res__box-title {
		font-size: 16px;
	}

	.csr-res__arrow {
		width: 32px;
	}

	.csr-res__cards {
		gap: 20px;
	}

	.csr-res__card {
		flex-basis: calc((100% - 20px) / 2);
	}
}

/* Mobile: the diagram stacks, arrows turn vertical. */
@media (max-width: 640px) {
	.csr-res__intro,
	.csr-res__diagram {
		margin-bottom: 32px;
	}

	.csr-res__diagram {
		flex-direction: column;
		gap: 8px;
	}

	.csr-res__box {
		flex-basis: auto;
		width: 100%;
	}

	/* Vertical arrow: a 40px-tall slot so the rotated arrow has real
	   room between the stacked boxes instead of overlapping the gap. */
	.csr-res__arrow {
		justify-content: center;
		align-items: center;
		width: 40px;
		height: 40px;
	}

	.csr-res__arrow svg {
		width: 40px;
		flex-shrink: 0;
		transform: rotate(90deg);
	}

	.csr-res__card {
		flex-basis: 100%;
		padding: 24px;
	}
}
