/*
 * Solutions (2026 design): the Solutions landing page and the three industry
 * pages. Section markup comes from inc/solutions.php (patterns solution-* and
 * solutions-*). Builds on home.css (.ramen-section, .ramen-lede, .ramen-stats,
 * .ramen-stack-cards / .ramen-solution) and technology.css (.ramen-tech-hero,
 * .ramen-tech-cta).
 */

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

/* Spacing comes from flex gaps, not block margins. */
.ramen-sol .wp-block-group > *,
.ramen-sol .ramen-main > * {
	margin-block: 0 !important;
}

/* Section headings are Display MD (48) here; home.css takes them to 48/32 below 1200/768. */
@media (min-width: 1200px) {
	.ramen-sol h2 {
		font-size: var(--wp--preset--font-size--huge);
	}
}

.ramen-sol h2 {
	max-width: 820px;
}

.ramen-sol .ramen-lede {
	margin: 0;
}

/* Copy on the left, something 560px wide on the right. */
.ramen-sol-row {
	display: flex;
	align-items: center;
	gap: 64px;
}

.ramen-sol-row__text {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 32px;
	min-width: 0;
}

/* ---------- Hero ----------
 * The Technology hero (.ramen-tech-hero: mirrored photo, wash, glows) with an
 * 860px text column.
 */

.ramen-sol-hero .ramen-hero__title,
.ramen-sol-hero .ramen-hero__lead {
	max-width: 860px;
}

/* Even line lengths where Figma breaks the headline by hand. */
.ramen-sol-hero .ramen-hero__title.is-balanced {
	text-wrap: balance;
}

/* ---------- The challenge ---------- */

.ramen-sol-points {
	flex: 0 0 560px;
	box-sizing: border-box;
	margin: 0;
	padding: 32px;
	border: 1px solid var(--wp--preset--color--gray-2);
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--base);
	list-style: none;
}

.ramen-sol-points > li {
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 16px 0;
	border-bottom: 1px solid var(--wp--preset--color--gray-2);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 300;
	line-height: 1.4;
}

.ramen-sol-points > li:last-child {
	border-bottom: 0;
}

/* Periwinkle 8px rounded-square marker, centred on the first line. */
.ramen-sol-points > li::before {
	content: "";
	flex: 0 0 8px;
	height: 8px;
	margin-top: 9px;
	border-radius: 2px;
	background-color: var(--wp--preset--color--accent);
}

/* ---------- How Ramen helps ----------
 * Panels stack by default (editor, no JS, narrow screens). On desktop
 * solutions.js wraps the progress bar and track in a sticky .ramen-sol-helps__pin
 * and turns vertical scroll into a sideways move of the track (.is-pinned);
 * if the viewport is too short to hold a panel it scrolls sideways natively
 * instead (.is-scroller).
 */

.ramen-sol-helps__track {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.ramen-sol-panel {
	display: flex;
	align-items: center;
	gap: 64px;
	box-sizing: border-box;
	padding: 48px;
	border: 1px solid var(--wp--preset--color--gray-2);
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--base);
}

.ramen-sol-panel__text {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-self: flex-start;
	gap: 32px;
	min-width: 0;
}

.ramen-sol-panel__num {
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 410;
	line-height: 1.2;
}

.ramen-section .ramen-sol-panel__title {
	font-size: var(--wp--preset--font-size--huge);
	line-height: 1.2;
}

/* Figma lets the titles run ~30px into the gap beside the photo. */
@media (min-width: 1024px) {
	.ramen-section .ramen-sol-panel__title {
		width: calc(100% + 30px);
		max-width: none;
	}
}

.ramen-sol-panel__image {
	position: relative;
	flex: 0 0 440px;
	height: 400px;
	margin: 0;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--card);
}

.ramen-sol-panel__image img,
.ramen-sol-split__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ramen-sol-panel__image::after,
.ramen-sol-split__image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(4, 16, 84, 0), rgba(4, 16, 84, 0.15));
	pointer-events: none;
}

/* Proof note: Ramen White with a periwinkle edge. */
.ramen-sol-proof {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 32px;
	border-left: 2px solid var(--wp--preset--color--accent);
	background-color: var(--wp--preset--color--surface);
}

.ramen-sol-proof__label {
	color: var(--wp--preset--color--contrast-2);
	font-family: var(--wp--preset--font-family--chivo-mono);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ramen-sol-proof__text {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 300;
	line-height: 1.4;
}

/* Progress (built by solutions.js): 01 — three bars — 03, right-aligned. */
.ramen-sol-helps__progress {
	display: none;
}

.ramen-sol-helps:is(.is-pinned, .is-scroller) .ramen-sol-helps__progress {
	display: flex;
	align-items: center;
	align-self: flex-end;
	gap: 16px;
	color: var(--wp--preset--color--contrast-2);
	font-family: var(--wp--preset--font-family--chivo-mono);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.04em;
}

.ramen-sol-helps__current {
	min-width: 20px;
	color: var(--wp--preset--color--accent);
	font-variant-numeric: tabular-nums;
}

.ramen-sol-helps__bar {
	position: relative;
	width: 80px;
	height: 2px;
	background-color: var(--wp--preset--color--gray-2);
}

.ramen-sol-helps__bar::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--wp--preset--color--accent);
	transform: scaleX(var(--fill, 0));
	transform-origin: left;
}

/* Sideways layouts: the track runs to the viewport edge. */
.ramen-sol-helps:is(.is-pinned, .is-scroller) {
	--sol-bleed: max(0px, (100vw - var(--wp--custom--frame)) / 2);
	--sol-pad-x: 64px;
}

.ramen-sol-helps:is(.is-pinned, .is-scroller) .ramen-sol-helps__track {
	flex-direction: row;
	align-items: stretch;
}

.ramen-sol-helps:is(.is-pinned, .is-scroller) .ramen-sol-panel {
	flex: 0 0 min(1100px, 100%);
}

.ramen-sol-helps.is-pinned > .ramen-main {
	box-sizing: border-box;
	height: calc(var(--sol-pin-height) + var(--sol-travel));
	padding-block: 0;
}

/* The pin clips at the rail rule on the left and the viewport edge on the right. */
.ramen-sol-helps__pin {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--ramen-header-height));
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--sol-pin-gap, 64px);
	box-sizing: border-box;
	height: var(--sol-pin-height);
	margin-inline: calc(-1 * var(--sol-pad-x)) calc(-1 * var(--sol-pad-x) - var(--sol-bleed));
	padding: var(--sol-pin-pad, 120px) calc(var(--sol-pad-x) + var(--sol-bleed)) var(--sol-pin-pad, 120px) var(--sol-pad-x);
	overflow: clip;
}

.ramen-sol-helps.is-pinned .ramen-sol-helps__track {
	will-change: transform;
}

.ramen-sol-helps.is-pinned .ramen-sol-panel {
	min-height: var(--sol-panel-height, auto);
}

/* Windows too short for Figma's 1048px frame: tighter panels so they still pin. */
.ramen-sol-helps.is-compact .ramen-sol-panel {
	padding: 32px 48px;
}

.ramen-sol-helps.is-compact .ramen-sol-panel__text {
	gap: 20px;
}

.ramen-sol-helps.is-compact .ramen-sol-panel__num,
.ramen-section .ramen-sol-helps.is-compact .ramen-sol-panel__title {
	font-size: 40px;
}

/* Not enough height to pin: a native sideways scroller. */
.ramen-sol-helps.is-scroller .ramen-sol-helps__pin {
	position: static;
	height: auto;
	padding-block: 0;
	overflow: visible;
}

.ramen-sol-helps.is-scroller .ramen-sol-helps__track {
	margin-inline: calc(-1 * var(--sol-pad-x)) calc(-1 * var(--sol-pad-x) - var(--sol-bleed));
	padding-inline: var(--sol-pad-x) calc(var(--sol-pad-x) + var(--sol-bleed));
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--sol-pad-x);
	scrollbar-width: none;
}

.ramen-sol-helps.is-scroller .ramen-sol-helps__track::-webkit-scrollbar {
	display: none;
}

.ramen-sol-helps.is-scroller .ramen-sol-panel {
	scroll-snap-align: start;
}

/* ---------- Customer story ---------- */

.ramen-sol-story {
	overflow: clip;
}

/* Blue haze in the bottom-left corner (the home "How" glow). */
.ramen-sol-story::before,
.ramen-sol-story::after {
	content: "";
	position: absolute;
	z-index: 0;
	pointer-events: none;
	background: center / 100% 100% no-repeat;
}

.ramen-sol-story::before {
	left: calc(var(--ramen-frame-inset) - 1210px);
	bottom: -320px;
	width: 2175px;
	height: 1338px;
	background-image: url(../images/home/how-glow-1.webp);
}

.ramen-sol-story::after {
	left: calc(var(--ramen-frame-inset) - 732px);
	bottom: -197px;
	width: 1219px;
	height: 828px;
	background-image: url(../images/home/how-glow-2.webp);
}

.ramen-sol-story__top {
	display: flex;
	align-items: stretch;
	gap: 64px;
}

.ramen-sol-story__text {
	display: flex;
	flex: 0 0 calc((100% - 64px) * 0.4577);
	flex-direction: column;
	gap: 32px;
	min-width: 0;
}

.ramen-sol-story__text .ramen-actions {
	padding-top: 8px;
}

/* Logo tile: the image block itself is the 260 × 140 tile. */
.ramen-sol-story__logo {
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 260px;
	min-height: 140px;
	padding: 16px;
	border: 1px solid var(--wp--preset--color--gray-2);
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--surface);
}

.ramen-sol-story__logo img {
	display: block;
	height: auto !important;
}

.ramen-sol-story .ramen-sol-story__text h2 {
	max-width: 422px;
	color: var(--wp--preset--color--base);
}

.ramen-sol-story__body {
	color: var(--wp--preset--color--gray);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 300;
	line-height: 1.4;
}

/* Quote card: periwinkle-to-navy gradient, mark at the top, quote at the bottom. */
.wp-block-quote.ramen-sol-quote {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	justify-content: flex-end;
	gap: 24px;
	box-sizing: border-box;
	min-width: 0;
	margin: 0;
	padding: 48px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--wp--custom--radius--card);
	background: linear-gradient(138.87deg, #6b7ded 14.286%, #1f2b8c 85.714%);
	box-shadow: 0 24px 30px rgba(5, 13, 77, 0.35);
	color: var(--wp--preset--color--base);
	quotes: none;
}

.wp-block-quote.ramen-sol-quote::before {
	content: "\201C";
	margin-bottom: auto;
	color: var(--wp--preset--color--accent-2);
	font-size: var(--wp--preset--font-size--giant);
	font-weight: 410;
	line-height: 1.2;
}

.wp-block-quote.ramen-sol-quote > p {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 410;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

.wp-block-quote.ramen-sol-quote.is-small > p {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.4;
}

.wp-block-quote.ramen-sol-quote cite {
	display: block;
	margin: 0;
	color: var(--wp--preset--color--accent-2);
	font-family: var(--wp--preset--font-family--chivo-mono);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	word-spacing: 0.15em;
}

.ramen-sol-quote__slash {
	padding-inline: 0.35em;
	opacity: 0.6;
}

/* Stats: one translucent card split in three. */
.ramen-sol-story__stats {
	display: flex;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--wp--custom--radius--card);
	background-color: rgba(255, 255, 255, 0.04);
}

.ramen-sol-story__stat {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	padding: 40px;
}

.ramen-sol-story__stat + .ramen-sol-story__stat {
	border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.ramen-sol-story__number {
	flex: 1 1 auto;
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 410;
	line-height: 1.2;
}

.ramen-sol-story__label {
	color: var(--wp--preset--color--gray-2);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 400;
	line-height: 1.5;
}

/* ---------- Copy and photo ---------- */

.ramen-sol-split h2 {
	max-width: 440px;
	text-wrap: balance;
}

.ramen-sol-split__image {
	position: relative;
	flex: 0 0 560px;
	height: 400px;
	margin: 0;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--card);
}

/* ---------- How it works ----------
 * The photo fills the main column, faded to Ramen White towards the bottom and
 * washed periwinkle/cyan; the statement sits at the bottom left.
 */

.ramen-sol-how > .ramen-main {
	justify-content: flex-end;
	box-sizing: border-box;
	min-height: 768px;
	padding: 64px;
	overflow: clip;
}

.ramen-sol-how__photo {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0 !important;
}

.ramen-sol-how__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ramen-sol-how > .ramen-main::before,
.ramen-sol-how > .ramen-main::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.ramen-sol-how > .ramen-main::before {
	background: linear-gradient(180deg, rgba(249, 250, 255, 0.1) 0%, rgba(249, 250, 255, 0.5) 45%, rgba(249, 250, 255, 0.96) 66%, var(--wp--preset--color--surface) 100%);
}

.ramen-sol-how > .ramen-main::after {
	background:
		linear-gradient(180deg, rgba(107, 125, 237, 0) 60%, rgba(107, 125, 237, 0.12) 100%),
		linear-gradient(90deg, rgba(51, 224, 242, 0.16) 0%, rgba(107, 125, 237, 0.06) 45%, rgba(107, 125, 237, 0.26) 100%);
}

.ramen-sol-how__text {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 32px;
	max-width: 960px;
}

.ramen-sol-how__statement {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 410;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

/* ---------- Landing: industries we serve ----------
 * The home solution cards (.ramen-stack-cards > .ramen-solution) plus a subtitle.
 */

@media (min-width: 1200px) {
	.ramen-sol-industries h2 {
		font-size: var(--wp--preset--font-size--giant);
	}
}

.ramen-section .ramen-solution__subtitle {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 410;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

/* ---------- Landing: compare table ---------- */

.wp-block-table.ramen-compare {
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--contrast-2);
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--base);
}

.wp-block-table.ramen-compare table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.wp-block-table.ramen-compare :is(th, td) {
	box-sizing: border-box;
	padding: 32px;
	border: 0;
	text-align: left;
}

.wp-block-table.ramen-compare thead {
	border: 0;
}

.wp-block-table.ramen-compare thead th {
	vertical-align: bottom;
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 410;
	line-height: 1.4;
	letter-spacing: 0.02em;
}

.wp-block-table.ramen-compare thead th:first-child {
	width: 230px;
}

.wp-block-table.ramen-compare thead th + th {
	border-left: 1px solid var(--wp--preset--color--contrast-2);
}

.wp-block-table.ramen-compare tbody td {
	vertical-align: top;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 300;
	line-height: 1.4;
}

.wp-block-table.ramen-compare tbody td + td {
	border-left: 1px solid var(--wp--preset--color--gray-2);
}

.wp-block-table.ramen-compare tbody tr + tr td {
	border-top: 1px solid var(--wp--preset--color--gray-2);
}

.wp-block-table.ramen-compare tbody tr:nth-child(even) {
	background-color: var(--wp--preset--color--surface);
}

.wp-block-table.ramen-compare tbody td:first-child {
	color: var(--wp--preset--color--contrast-2);
	font-family: var(--wp--preset--font-family--chivo-mono);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

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

@media (max-width: 1199px) {
	.ramen-sol-helps:is(.is-pinned, .is-scroller) {
		--sol-pad-x: 40px;
	}

	.ramen-sol-row {
		gap: 40px;
	}

	.ramen-sol-points {
		flex-basis: 46%;
	}

	.ramen-sol-split__image {
		flex-basis: 46%;
		height: 340px;
	}

	.ramen-sol-panel {
		gap: 40px;
		padding: 40px;
	}

	.ramen-sol-panel__image {
		flex-basis: 40%;
		height: 340px;
	}

	.ramen-section .ramen-sol-panel__title {
		font-size: var(--wp--preset--font-size--xx-large);
	}

	.ramen-sol-story__top {
		flex-direction: column;
	}

	.ramen-sol-story__text,
	.wp-block-quote.ramen-sol-quote {
		flex: 0 0 auto;
	}

	.wp-block-quote.ramen-sol-quote {
		min-height: 420px;
	}

	.ramen-sol-how > .ramen-main {
		min-height: 640px;
		padding: 40px;
	}

	.wp-block-table.ramen-compare thead th {
		font-size: var(--wp--preset--font-size--large);
	}

	.wp-block-table.ramen-compare :is(th, td) {
		padding: 24px;
	}

	.wp-block-table.ramen-compare thead th:first-child {
		width: 180px;
	}
}

@media (max-width: 1023px) {
	.ramen-sol-row,
	.ramen-sol-panel {
		flex-direction: column;
		align-items: stretch;
	}

	.ramen-sol-points,
	.ramen-sol-split__image,
	.ramen-sol-panel__image {
		flex-basis: auto;
	}

	.ramen-sol-split__image,
	.ramen-sol-panel__image {
		order: -1;
		height: 320px;
	}

	/* Wide table: scroll it sideways inside its frame. */
	.wp-block-table.ramen-compare {
		overflow-x: auto;
	}

	.wp-block-table.ramen-compare table {
		min-width: 820px;
	}
}

@media (max-width: 767px) {
	.ramen-sol-row {
		gap: 32px;
	}

	.ramen-sol-points {
		padding: 8px 20px;
	}

	.ramen-sol-points > li {
		font-size: var(--wp--preset--font-size--base);
	}

	.ramen-sol-points > li::before {
		margin-top: 8px;
	}

	.ramen-sol-panel {
		gap: 24px;
		padding: 20px 20px 28px;
	}

	.ramen-sol-panel__text {
		gap: 20px;
	}

	.ramen-sol-split__image,
	.ramen-sol-panel__image {
		height: 220px;
	}

	.ramen-sol-panel__num {
		font-size: var(--wp--preset--font-size--xx-large);
	}

	.ramen-section .ramen-sol-panel__title {
		font-size: var(--wp--preset--font-size--x-large);
	}

	.ramen-sol-proof {
		padding: 16px 20px;
	}

	.ramen-sol-proof__text,
	.ramen-sol-story__body {
		font-size: var(--wp--preset--font-size--base);
	}

	.ramen-sol-story__top {
		gap: 40px;
	}

	.wp-block-quote.ramen-sol-quote {
		min-height: 0;
		padding: 28px 24px;
	}

	.wp-block-quote.ramen-sol-quote::before {
		margin-bottom: 8px;
		font-size: var(--wp--preset--font-size--huge);
		line-height: 1;
	}

	.wp-block-quote.ramen-sol-quote > p,
	.wp-block-quote.ramen-sol-quote.is-small > p {
		font-size: var(--wp--preset--font-size--large);
		line-height: 1.4;
	}

	.ramen-sol-story__stats {
		flex-direction: column;
	}

	.ramen-sol-story__stat {
		padding: 24px;
	}

	.ramen-sol-story__stat + .ramen-sol-story__stat {
		border-top: 1px solid rgba(255, 255, 255, 0.14);
		border-left: 0;
	}

	.ramen-sol-story__number {
		font-size: var(--wp--preset--font-size--xx-large);
	}

	.ramen-sol-how > .ramen-main {
		min-height: 560px;
		padding: 40px 16px;
	}

	.ramen-sol-how__statement {
		font-size: var(--wp--preset--font-size--x-large);
	}

	.ramen-section .ramen-solution__subtitle {
		font-size: var(--wp--preset--font-size--x-large);
	}

	.wp-block-table.ramen-compare :is(th, td) {
		padding: 20px;
	}

	.wp-block-table.ramen-compare thead th:first-child {
		width: 150px;
	}
}
