/*
 * Theme Framework With Licensing -- 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.
 */

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

/* py-10 lg:py-14, without the export's full-screen minimum. The breadcrumb
   that opened it is left out, so the kicker needs no top margin. */
.tfl-hero {
	background: var(--rv-white);
	padding-block: 2.5rem;
}

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

.tfl-title {
	margin: 1.5rem 0 0;
	font-weight: 800;
	color: var(--rv-black);
}

@media (min-width: 1024px) {
	.tfl-title {
		margin-top: 2rem;
		margin-left: -1px;
	}
}

.tfl-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-7, w-16 green + w-8 at 20% */
.tfl-progress {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

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

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

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

/* mt-8 max-w-[42rem] 0.9375rem lg:text-base leading-relaxed */
.tfl-hero-lede {
	margin: 2rem 0 0;
	max-width: 42rem;
	font-size: 0.9375rem;
	line-height: 1.625;
	color: var(--rv-case-muted);
}

@media (min-width: 1024px) {
	.tfl-hero-lede { font-size: 1rem; }
}

/* mt-8 lg:mt-10 grid border lg:grid-cols-2 */
.tfl-herocards {
	display: grid;
	margin-top: 2rem;
	border: 1px solid var(--rv-case-border);
}

@media (min-width: 1024px) {
	.tfl-herocards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-top: 2.5rem;
	}
}

.tfl-herocard { padding: 1.25rem; }

@media (min-width: 1024px) {
	.tfl-herocard { padding: 1.5rem; }
}

.tfl-herocard--constraint {
	border-bottom: 1px solid var(--rv-case-border);
	border-left: 2px solid var(--rv-blue);
}

@media (min-width: 1024px) {
	.tfl-herocard--constraint {
		border-bottom: 0;
		border-right: 1px solid var(--rv-case-border);
	}
}

.tfl-herocard--rebuild {
	border-left: 2px solid var(--rv-green);
	background: rgb(var(--rv-green-rgb) / 0.1);
}

.tfl-herocard-body {
	margin: 0.75rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.375;
	color: var(--rv-case-muted);
}

.tfl-herocard-body--strong {
	font-weight: 500;
	color: var(--rv-black);
}

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

/* grid gap-12 lg:[1fr 1.1fr] lg:gap-20 */
.tfl-engagement {
	display: grid;
	gap: 3rem;
}

@media (min-width: 1024px) {
	.tfl-engagement {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
		gap: 5rem;
	}
}

.tfl-engagement-col { min-width: 0; }

/* text-3xl lg:text-[2.5rem] extrabold */
.tfl-engagement-h {
	margin: 0;
	font-size: 1.875rem;
	line-height: 1.2;
	font-weight: 800;
	color: var(--rv-black);
}

@media (min-width: 1024px) {
	.tfl-engagement-h { font-size: 2.5rem; }
}

/* mt-6 max-w-[34rem] border-l-2 blue pl-5 1.0625rem italic */
.tfl-nda {
	margin: 1.5rem 0 0;
	max-width: 34rem;
	border-left: 2px solid var(--rv-blue);
	padding-left: 1.25rem;
	font-size: 1.0625rem;
	line-height: 1.625;
	font-style: italic;
	color: var(--rv-case-muted);
}

/* space-y-8 */
.tfl-meta { margin: 0; }

.tfl-meta-row { min-width: 0; }

.tfl-meta-row + .tfl-meta-row { margin-top: 2rem; }

.tfl-meta dt {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--rv-black);
}

.tfl-meta dd {
	margin: 0.5rem 0 0;
	max-width: 32rem;
	font-size: 0.9375rem;
	line-height: 1.375;
	color: var(--rv-case-muted);
}

/* ---------------------------------------------------------------- process */

/* grid gap-8 lg:[17rem 1fr] lg:gap-16 */
.tfl-process {
	display: grid;
	gap: 2rem;
}

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

.tfl-process > * { min-width: 0; }

/* text-2xl lg:text-[2rem] lg:leading-tight */
.tfl-process-h {
	margin: 1rem 0 0;
	font-size: 1.5rem;
	line-height: 1.33333;
	font-weight: 700;
	color: var(--rv-black);
}

@media (min-width: 1024px) {
	.tfl-process-h {
		font-size: 2rem;
		line-height: 1.25;
	}
}

/* mt-6 h-1.5 w-16 green, under a heading */
.tfl-bar {
	margin-top: 1.5rem;
	height: 0.375rem;
	width: 4rem;
	background: var(--rv-green);
}

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

.tfl-mt8 { margin-top: 2rem; }

/* ------------------------------------------------------------------ admin */

/* mt-10 grid gap-x-10 gap-y-8 sm:grid-cols-3 lg:gap-12 */
.tfl-admin {
	display: grid;
	gap: 2rem 2.5rem;
	margin-top: 2.5rem;
}

@media (min-width: 640px) {
	.tfl-admin { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.tfl-admin { gap: 3rem; }
}

/* ------------------------------------------------------------- categories */

.tfl-categories {
	margin: 3.5rem 0 0;
	padding: 0;
	border-top: 1px solid rgb(var(--rv-white-rgb) / 0.12);
	list-style: none;
}

/* grid-cols-[3.5rem 1fr] gap-x-5 py-8 lg:[7rem 1fr] lg:gap-x-10 lg:py-10 */
.tfl-category {
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 1fr);
	align-items: start;
	column-gap: 1.25rem;
	border-bottom: 1px solid rgb(var(--rv-white-rgb) / 0.12);
	padding-block: 2rem;
	transition: background-color 0.2s;
}

@media (min-width: 1024px) {
	.tfl-category {
		grid-template-columns: 7rem minmax(0, 1fr);
		column-gap: 2.5rem;
		padding-block: 2.5rem;
	}
}

.tfl-category:not(.tfl-category--lead):hover { background: rgb(var(--rv-white-rgb) / 0.04); }

/* The first row inverts to green and bleeds past the shell's gutter. */
.tfl-category--lead {
	margin-inline: -1.5rem;
	background: var(--rv-green);
	padding-inline: 1.5rem;
}

@media (min-width: 1024px) {
	.tfl-category--lead {
		margin-inline: -5rem;
		padding-inline: 5rem;
	}
}

/* text-3xl lg:text-5xl */
.tfl-category-n {
	font-size: 1.875rem;
	line-height: 1.2;
	color: var(--rv-green);
}

@media (min-width: 1024px) {
	.tfl-category-n {
		font-size: 3rem;
		line-height: 1;
	}
}

.tfl-category--lead .tfl-category-n { color: rgb(var(--rv-black-rgb) / 0.4); }

/* text-xl lg:text-3xl */
.tfl-category-h {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.4;
	font-weight: 700;
	color: var(--rv-white);
}

@media (min-width: 1024px) {
	.tfl-category-h {
		font-size: 1.875rem;
		line-height: 1.2;
	}
}

.tfl-category--lead .tfl-category-h { color: var(--rv-black); }

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

.tfl-cta {
	position: relative;
	overflow: hidden;
	padding-block: 5rem;
}

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

.tfl-cta-grid {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.07;
	background-image: repeating-linear-gradient(to right, var(--rv-white) 0 1px, transparent 1px 8.5rem);
}

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

@media (min-width: 1024px) {
	.tfl-cta-curve { height: 14rem; }
}

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

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

/* 70rem rather than the design's max-w-4xl, as on Density: at the shared
   heading size a narrower box broke each sentence mid-line. */
.tfl-cta-h {
	margin: 2rem 0 0;
	max-width: 70rem;
	font-weight: 800;
	color: var(--rv-white);
}

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

/* mt-8 max-w-[34rem] 0.9375rem lg:text-base */
.tfl-cta-lede {
	margin: 2rem 0 0;
	max-width: 34rem;
	font-size: 0.9375rem;
	line-height: 1.625;
	color: rgb(var(--rv-white-rgb) / 0.6);
}

@media (min-width: 1024px) {
	.tfl-cta-lede { font-size: 1rem; }
}

.tfl-cta-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	margin-top: 3rem;
}

@media (min-width: 640px) {
	.tfl-cta-actions {
		flex-direction: row;
		align-items: center;
		gap: 2.5rem;
	}
}

.tfl-cta-btn {
	display: inline-flex;
	min-height: 3.5rem;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding-inline: 2rem;
	font-size: 1rem;
	font-weight: 700;
}

@media (min-width: 640px) {
	.tfl-cta-btn { width: auto; }
}

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

@media (prefers-reduced-motion: reduce) {
	.tfl-category,
	.tfl-cta-btn { transition: none; }
}
