/*
 * Tyche Softwares -- the shapes belonging to this case study only.
 *
 * Shared pieces live in assets/css/global/case-system.css. Each rule here
 * resolves the Tailwind classes on the matching element in the export's
 * src/routes/index.tsx rather than reinterpreting them. Colours come from the
 * token layer. Breakpoints match the export's: sm 640px, lg 1024px.
 */

/* ------------------------------------------------------------------ shared */

.tyc-col { min-width: 0; }

/* mt-6 h-1.5 w-24, the green bar under a section head */
.tyc-bar {
	margin-top: 1.5rem;
	height: 0.375rem;
	width: 6rem;
	background: var(--rv-green);
}

.tyc-bar--short { width: 4rem; }
.tyc-bar--yellow { background: var(--rv-yellow); }

.tyc-prose-after-bar { margin-top: 2rem; }
.tyc-prose-after-h3 { margin-top: 1.5rem; }

/* text-2xl font-bold lg:text-[2rem]; the arbitrary lg size keeps 2xl's ratio. */
.tyc-h3 {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.33333;
	font-weight: 700;
	color: var(--rv-black);
}

@media (min-width: 1024px) {
	.tyc-h3 { font-size: 2rem; }
	.tyc-h3--sm { font-size: 1.75rem; }
	.tyc-h3--lg { font-size: 2.25rem; }
}

.tyc-h3--after-eyebrow { margin-top: 1rem; }

/* The export's inline link: font-medium text-foreground, green underline. */
.tyc-link {
	font-weight: 500;
	color: var(--rv-black);
}

.tyc-link--blue { text-decoration-color: var(--rv-blue); }

/* The one service-page link sits in the pulled paragraph, where the export
   set its link bold. */
.tyc .cs-prose-pull .cs-service-link { font-weight: 700; }

/* ------------------------------------------------------------------- hero */

/* py-12 lg:py-20 */
.tyc-hero {
	background: var(--rv-white);
	padding-block: 3rem;
}

@media (min-width: 1024px) {
	.tyc-hero { padding-block: 5rem; }
}

/* The size, leading and tracking are the shared .cs-title. */
.tyc-title {
	margin: 0;
	max-width: 64rem;
	font-weight: 800;
	color: var(--rv-black);
}

@media (min-width: 1024px) {
	.tyc-title { margin-left: -0.25rem; }
}

.tyc-title-mark {
	background: var(--rv-green);
	padding-inline: 0.75rem;
	color: var(--rv-black);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/* mt-6 lg:mt-8, w-16 green + w-8 at 20% */
.tyc-progress {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

@media (min-width: 1024px) {
	.tyc-progress { margin-top: 2rem; }
}

.tyc-progress-on,
.tyc-progress-off { height: 0.375rem; }

.tyc-progress-on { width: 4rem; background: var(--rv-green); }
.tyc-progress-off { width: 2rem; background: rgb(var(--rv-black-rgb) / 0.2); }

.tyc-hero-body {
	margin-top: 2.5rem;
	min-width: 0;
	max-width: 46rem;
}

.tyc-lede {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.625;
	color: var(--rv-case-muted);
}

@media (min-width: 1024px) {
	.tyc-lede { font-size: 1.15rem; }
}

/* ---------------------------------------------------------------- plugins */

/* mt-12 gap-12 lg:mt-16 lg:grid-cols-[7fr_5fr] lg:items-center lg:gap-16 */
.tyc-plugins {
	display: grid;
	gap: 3rem;
	margin-top: 3rem;
}

@media (min-width: 1024px) {
	.tyc-plugins {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		align-items: center;
		gap: 4rem;
		margin-top: 4rem;
	}
}

.tyc-pluginlist {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 2px solid rgb(var(--rv-green-rgb) / 0.4);
}

.tyc-pluginlist > li { border-bottom: 1px solid rgb(var(--rv-black-rgb) / 0.15); }

.tyc-pluginlist-link {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding-block: 1.5rem;
	text-decoration: none;
	transition: background-color 0.2s;
}

.tyc-pluginlist-link:hover { background: var(--rv-white); }

/* num text-2xl lg:text-3xl, green at 60% to full on hover */
.tyc-pluginlist-n {
	font-size: 1.5rem;
	line-height: 1.33333;
	color: rgb(var(--rv-green-rgb) / 0.6);
	transition: color 0.2s;
}

.tyc-pluginlist-link:hover .tyc-pluginlist-n { color: var(--rv-green); }

.tyc-pluginlist-name {
	font-size: 1.125rem;
	line-height: 1.55556;
	font-weight: 700;
	color: var(--rv-black);
}

@media (min-width: 1024px) {
	.tyc-pluginlist-n {
		font-size: 1.875rem;
		line-height: 1.2;
	}

	.tyc-pluginlist-name {
		font-size: 1.25rem;
		line-height: 1.4;
	}
}

/* ------------------------------------------------------------- engagement */

/* grid gap-8 lg:grid-cols-[17rem_1fr] lg:gap-16 */
.tyc-began {
	display: grid;
	gap: 2rem;
}

@media (min-width: 1024px) {
	.tyc-began {
		grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
		gap: 4rem;
	}
}

/* -------------------------------------------------------------- obstacles */

/* mt-14 grid gap-10 border-t-2 border-foreground pt-10 lg:grid-cols-2 lg:gap-16 */
.tyc-obstacles {
	display: grid;
	gap: 2.5rem;
	margin-top: 3.5rem;
	border-top: 2px solid var(--rv-black);
	padding-top: 2.5rem;
}

@media (min-width: 1024px) {
	.tyc-obstacles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4rem;
	}
}

.tyc-obstacles-col { min-width: 0; }

.tyc-obstacles-bar {
	margin-top: 1.5rem;
	height: 0.25rem;
	width: 3.5rem;
	background: var(--rv-green);
}

.tyc-obstacles-col--green .tyc-obstacles-bar { background: var(--rv-green); }
.tyc-obstacles-col--blue .tyc-obstacles-bar { background: var(--rv-blue); }

.tyc-obstacles-list {
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

.tyc-obstacles-list > li {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	align-items: start;
	column-gap: 1rem;
	border-top: 1px solid rgb(var(--rv-black-rgb) / 0.15);
	padding-block: 1.25rem;
}

/* num text-xl */
.tyc-obstacles-n {
	font-size: 1.25rem;
	line-height: 1.4;
	color: var(--rv-green);
}

.tyc-obstacles-col--green .tyc-obstacles-n { color: var(--rv-green); }
.tyc-obstacles-col--blue .tyc-obstacles-n { color: var(--rv-blue); }

.tyc-obstacles-text {
	margin: 0;
	line-height: 1.625;
	color: var(--rv-case-muted);
}

/* --------------------------------------------------------- implementation */

.tyc-impl {
	margin-top: 3.5rem;
	border-top: 2px solid rgb(var(--rv-green-rgb) / 0.4);
}

/* grid gap-6 border-b border-l-2 py-8 pl-5, hover:bg-fog;
   lg:grid-cols-[4rem_20rem_1fr] lg:gap-12 lg:py-12 lg:pl-8 */
.tyc-impl-row {
	display: grid;
	min-width: 0;
	gap: 1.5rem;
	border-bottom: 1px solid rgb(var(--rv-green-rgb) / 0.35);
	border-left: 2px solid var(--rv-green);
	padding: 2rem 0 2rem 1.25rem;
	transition: background-color 0.2s;
}

.tyc-impl-row:hover { background: var(--rv-fog); }

.tyc-impl-mark {
	display: flex;
	align-items: center;
	gap: 1rem;
}

/* num text-3xl lg:text-5xl at 25%, full ink on hover */
.tyc-impl-n {
	margin: 0;
	font-size: 1.875rem;
	line-height: 1.2;
	color: rgb(var(--rv-black-rgb) / 0.25);
	transition: color 0.2s;
}

.tyc-impl-row:hover .tyc-impl-n { color: var(--rv-black); }

.tyc-impl-bar {
	height: 0.25rem;
	width: 3.5rem;
	background: var(--rv-green);
}

.tyc-impl-bar--green { background: var(--rv-green); }
.tyc-impl-bar--blue { background: var(--rv-blue); }

.tyc-impl-head { min-width: 0; }

.tyc-impl-body {
	min-width: 0;
	line-height: 1.625;
	color: var(--rv-case-muted);
}

.tyc-impl-body > p { margin: 0; }
.tyc-impl-body > p + p { margin-top: 1rem; }

@media (min-width: 1024px) {
	.tyc-impl-row {
		grid-template-columns: minmax(0, 4rem) minmax(0, 20rem) minmax(0, 1fr);
		align-items: start;
		gap: 3rem;
		padding: 3rem 0 3rem 2rem;
	}

	.tyc-impl-mark { display: block; }

	.tyc-impl-n {
		font-size: 3rem;
		line-height: 1;
	}

	.tyc-impl-bar {
		margin-top: 1.25rem;
		width: 2rem;
	}

	.tyc-impl-body {
		border-left: 1px solid rgb(var(--rv-black-rgb) / 0.1);
		padding-left: 3rem;
	}
}

/* --------------------------------------------------------------- creative */

/* mt-14 grid gap-12 border-t-2 border-foreground pt-10 lg:grid-cols-2 lg:items-center lg:gap-16 */
.tyc-pages {
	display: grid;
	gap: 3rem;
	margin-top: 3.5rem;
	border-top: 2px solid var(--rv-black);
	padding-top: 2.5rem;
}

@media (min-width: 1024px) {
	.tyc-pages {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: center;
		gap: 4rem;
	}
}

/* mt-16 grid gap-10 lg:grid-cols-2 lg:gap-16 */
.tyc-pair {
	display: grid;
	gap: 2.5rem;
	margin-top: 4rem;
}

@media (min-width: 1024px) {
	.tyc-pair {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4rem;
	}
}

.tyc-pair-col {
	border-top: 2px solid var(--rv-green);
	padding-top: 2rem;
}

.tyc-pair-col--green { border-top-color: var(--rv-green); }
.tyc-pair-col--blue { border-top-color: var(--rv-blue); }

/* ----------------------------------------------------------------- taison */

/* py-16 lg:py-24 */
.tyc-taison-inner { padding-block: 4rem; }

@media (min-width: 1024px) {
	.tyc-taison-inner { padding-block: 6rem; }
}

.tyc-taison-rule {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.tyc-taison-kicker {
	font-family: var(--rv-font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--rv-green);
}

.tyc-taison-line {
	height: 1px;
	flex: 1;
	background: rgb(var(--rv-white-rgb) / 0.15);
}

/* mt-10 grid gap-12 lg:grid-cols-[1fr_22rem] lg:items-center lg:gap-16 */
.tyc-taison-grid {
	display: grid;
	gap: 3rem;
	margin-top: 2.5rem;
}

@media (min-width: 1024px) {
	.tyc-taison-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
		align-items: center;
		gap: 4rem;
	}
}

/* text-[2rem] leading-[1.02] sm:text-5xl lg:text-[4rem]. In Tailwind 4 an
   explicit leading-* outranks the line-height a text-* size brings, so 1.02
   holds at every step. */
.tyc-taison-h {
	margin: 0;
	font-size: 2rem;
	line-height: 1.02;
	font-weight: 800;
	color: var(--rv-fog);
}

@media (min-width: 640px) {
	.tyc-taison-h { font-size: 3rem; }
}

@media (min-width: 1024px) {
	.tyc-taison-h { font-size: 4rem; }
}

.tyc-taison-copy {
	margin-top: 2rem;
	max-width: 46rem;
	line-height: 1.625;
	color: rgb(var(--rv-white-rgb) / 0.7);
}

.tyc-taison-copy > p { margin: 0; }
.tyc-taison-copy > p + p { margin-top: 1.25rem; }

.tyc-taison-link {
	font-weight: 500;
	color: var(--rv-green);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.tyc-taison-link:hover,
.tyc-taison-link:focus-visible { color: var(--rv-white); }

.tyc-mascot {
	margin: 0;
	min-width: 0;
	border-left: 2px solid var(--rv-green);
	padding-left: 2rem;
}

.tyc-mascot img {
	display: block;
	width: 100%;
	max-width: 18rem;
	height: auto;
}

.cs-tone-ink .tyc-mascot-cap {
	margin-top: 1.5rem;
	color: rgb(var(--rv-white-rgb) / 0.5);
}

/* ------------------------------------------------------------- networking */

/* grid gap-12 lg:grid-cols-2 lg:items-center lg:gap-16 */
.tyc-network {
	display: grid;
	gap: 3rem;
}

@media (min-width: 1024px) {
	.tyc-network {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: center;
		gap: 4rem;
	}
}

/* ---------------------------------------------------------------- results */

/* mt-12 grid gap-12 lg:grid-cols-2 lg:gap-20 */
.tyc-results {
	display: grid;
	gap: 3rem;
	margin-top: 3rem;
}

@media (min-width: 1024px) {
	.tyc-results {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 5rem;
	}
}

.tyc-nb {
	min-width: 0;
	border-top: 2px solid var(--rv-yellow);
	padding-top: 2rem;
}

.tyc-nb-label { color: var(--rv-yellow); }

.tyc-nb-body {
	margin: 1.5rem 0 0;
	line-height: 1.625;
	color: var(--rv-case-muted);
}

/* -------------------------------------------------------------------- cta */

/* py-20 sm:py-28 lg:py-36 */
.tyc-cta {
	position: relative;
	overflow: hidden;
	padding-block: 5rem;
}

@media (min-width: 640px) {
	.tyc-cta { padding-block: 7rem; }
}

@media (min-width: 1024px) {
	.tyc-cta { padding-block: 9rem; }
}

.tyc-cta-curve {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 60%;
	width: 100%;
	pointer-events: none;
}

.tyc-cta-inner { position: relative; }

.tyc-cta-row { gap: 1rem; }

.tyc-cta-tick { width: 2.5rem; }

/* The size, leading and tracking are the shared .cs-cta-h. 70rem rather than
   the export's max-w-4xl, as on Density: at the shared size each sentence
   needs about 69rem to stay on one line. */
.tyc-cta-h {
	margin: 2rem 0 0;
	max-width: 70rem;
	font-weight: 700;
	color: var(--rv-white);
}

.tyc-cta-accent { color: var(--rv-green); }

.tyc-cta-lede {
	margin: 2rem 0 0;
	max-width: 36rem;
	font-size: 1.0625rem;
	line-height: 1.625;
	color: rgb(var(--rv-white-rgb) / 0.6);
}

.tyc-cta-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2rem;
	margin-top: 3rem;
}

/* inline-flex gap-3 px-7 py-4 text-base font-bold */
.tyc-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.75rem;
	font-size: 1rem;
	font-weight: 700;
}

/* ------------------------------------------------------------------- a11y */

@media (prefers-reduced-motion: reduce) {
	.tyc-pluginlist-link,
	.tyc-pluginlist-n,
	.tyc-impl-row,
	.tyc-impl-n,
	.tyc-cta-btn { transition: none; }
}
