/**
 * Problem / solution comparison.
 *
 * The section's ground, its one responsive value, and the design's own
 * styling, lifted out of the partial's `style` attributes and kept
 * declaration for declaration. The breakpoint is the design's own
 * `narrow = w < 860`.
 */

/*
 * Deliberately no box-sizing reset. The design has none, and its panels lean
 * on `min-height` next to padding -- under border-box a `min-height: 118px`
 * box with 11px/13px padding comes out 118 tall instead of the design's 142,
 * and the error compounds up the section.
 */

/*
 * No background and no padding: both are yours to set. The design's ground
 * is shipped as `assets/images/problem-solution-bg.png` instead of the
 * gradient it used. `position: relative` and `overflow: hidden` stay -- the
 * grid overlay and glow below are absolutely positioned against this box.
 */
.rcps {
	position: relative;
	overflow: hidden;
}

.rcps__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: linear-gradient(rgba(165, 180, 252, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(165, 180, 252, 0.09) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.55) 66%, #000 100%);
	mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.55) 66%, #000 100%);
}

.rcps__glow {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(ellipse 68% 55% at 50% 42%, rgba(79, 70, 229, 0.26) 0%, rgba(79, 70, 229, 0) 70%);
}

.rcps__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: clamp(24px, 3vw, 36px);
	margin: 0 auto;
}

/*
 * Narrow first, matching the design's `narrow` branch: the two panels stack.
 */
.rcps__grid {
	display: grid;
	grid-template-columns: 1fr;
	align-items: stretch;
	gap: clamp(18px, 2.4vw, 24px);
}

/* The panels ---------------------------------------------------------------
 *
 * Same shell either side; only the hairline tells them apart.
 */

.rcps__panel {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: clamp(18px, 2.4vw, 24px);
	background: rgba(9, 12, 30, 0.46);
	border-radius: 16px;
}

.rcps__panel--problem {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.rcps__panel--solution {
	box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.3);
}

.rcps__panel-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
}

.rcps__panel-title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
}

.rcps__badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 26px;
	padding: 0 11px;
	border-radius: 999px;
}

.rcps__badge--problem {
	background: rgba(255, 107, 90, 0.14);
	box-shadow: inset 0 0 0 1px rgba(255, 107, 90, 0.4);
}

.rcps__badge--solution {
	background: rgba(79, 70, 229, 0.24);
	box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.5);
}

.rcps__badge-count {
	font-size: 14px;
	font-weight: 700;
}

.rcps__badge-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rcps__badge--problem .rcps__badge-count,
.rcps__badge--problem .rcps__badge-label {
	color: #ff8a7a;
}

.rcps__badge--solution .rcps__badge-count,
.rcps__badge--solution .rcps__badge-label {
	color: #c7d2fe;
}

/* The flow ----------------------------------------------------------------
 *
 * Three stacked steps on the problem side, one centred window on the other.
 */

.rcps__flow {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 10px;
}

.rcps__flow--centered {
	justify-content: center;
	gap: 14px;
	min-height: 0;
}

/*
 * Centred, not stretched: the window is a fixed-aspect drawing now, so it
 * sets the step's height rather than taking it.
 */
.rcps__step {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 14px;
}

.rcps__step-label {
	flex: 0 0 92px;
	align-self: center;
	font-size: 13px;
	font-weight: 500;
	color: #c3c8d6;
}

.rcps__load {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-left: 22px;
}

.rcps__load-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	border-radius: 999px;
	background: rgba(255, 107, 90, 0.12);
	box-shadow: inset 0 0 0 1px rgba(255, 107, 90, 0.34);
	color: #ff6b5a;
	font-size: 12px;
	line-height: 1;
}

.rcps__load-text {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #ff6b5a;
}

.rcps__caption {
	font-size: 13px;
	font-weight: 500;
	color: #c3c8d6;
	text-align: center;
}

/* The browser windows ------------------------------------------------------
 *
 * Each window is one inline SVG, drawn at the figures the old wireframe
 * markup resolved to. The frame stays here -- ground, radius and drop shadow
 * are the box's, not the drawing's -- and the SVG carries only what is
 * inside it. Because the drawing has a viewBox it scales as one piece, so a
 * window keeps its proportions at every width instead of holding a 165px
 * height while its width ran free.
 */

.rcps__window {
	flex: 1;
	min-width: 0;
	display: block;
	height: auto;
	background: linear-gradient(180deg, #232a50 0%, #1c2245 100%);
	border-radius: 10px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.17), 0 10px 24px -14px rgba(0, 0, 0, 0.65);
}

/*
 * The solution window draws its own hairline as the last shape in the SVG,
 * so it rides above the drawer that bleeds to the window's edge.
 */
.rcps__window--solution {
	flex: 0 0 auto;
	width: 100%;
	box-shadow: 0 20px 44px -20px rgba(79, 70, 229, 0.75);
}

/* The switch ---------------------------------------------------------------
 *
 * One breakpoint, at the design's own `narrow = w < 860`.
 */

@media (min-width: 860px) {

	.rcps__grid {
		grid-template-columns: 40fr 60fr;
	}
}
