/**
 * ZeltaCode Ways — front-end styles.
 *
 * Type stack: Inter Tight for headings and card titles, Space Grotesk for the
 * eyebrow, Inter for everything else.
 */

.zcwy {
	--zcwy-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--zcwy-font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--zcwy-font-label: 'Space Grotesk', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--zcwy-card-line: rgba( 255, 255, 255, 0.11 );
	--zcwy-icon-line: #ff8a4c;
	--zcwy-icon-box: 42px;
	--zcwy-icon-size: 20px;
	--zcwy-lift: -4px;

	background: #000;
	font-family: var( --zcwy-font-body );
}

/* The wrapper is included, not just its descendants, so a theme without a
   global reset cannot leave padding sitting outside the height. */
.zcwy,
.zcwy *,
.zcwy *::before,
.zcwy *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Heading block                                                       */
/* ------------------------------------------------------------------ */

.zcwy .zcwy__eyebrow {
	margin: 0 0 16px;
	font-family: var( --zcwy-font-label );
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 1.8px;
	line-height: 1;
	text-transform: uppercase;
	color: #5e9eff;
}

.zcwy .zcwy__heading {
	margin: 0;
	font-family: var( --zcwy-font-display );
	font-size: 48px;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -1.4px;
	color: #ededed;
	overflow-wrap: break-word;
}

.zcwy .zcwy__sub {
	margin: 18px 0 0;
	max-width: 62ch;
	font-size: 16px;
	line-height: 1.6;
	color: #8a8a8a;
}

/* ------------------------------------------------------------------ */
/* Grid and card                                                       */
/* ------------------------------------------------------------------ */

.zcwy__grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 20px;
	margin-top: 44px;
}

/**
 * A flex column with the description set to flex: 1. That pushes the link to
 * the bottom edge, so the links line up across cards whose descriptions run to
 * different lengths — and it is also what makes the link stretch the full
 * width of the card, which is where its underline comes from.
 */
.zcwy__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 28px 26px;
	border: 1px solid var( --zcwy-card-line );
	border-radius: 0;
	background-color: #0c0c0e;
	transition: border-color 300ms ease, transform 350ms cubic-bezier( 0.22, 0.6, 0.2, 1 );
}

.zcwy__card:hover {
	border-color: rgba( 255, 255, 255, 0.2 );
	transform: translateY( var( --zcwy-lift ) );
}

/* ------------------------------------------------------------------ */
/* Icon                                                                */
/* ------------------------------------------------------------------ */

.zcwy .zcwy__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: var( --zcwy-icon-box );
	height: var( --zcwy-icon-box );
	border: 1.5px solid var( --zcwy-icon-line );
	border-radius: 0;
	background-color: #141416;
}

.zcwy .zcwy__icon svg {
	width: var( --zcwy-icon-size );
	height: var( --zcwy-icon-size );
	fill: #8a8a8a;
}

.zcwy .zcwy__icon i {
	font-size: var( --zcwy-icon-size );
	line-height: 1;
	color: #8a8a8a;
}

/* ------------------------------------------------------------------ */
/* Card text                                                           */
/* ------------------------------------------------------------------ */

.zcwy .zcwy__title {
	margin: 0;
	font-family: var( --zcwy-font-display );
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.2px;
	color: #ededed;
}

.zcwy .zcwy__text {
	margin: 0;
	flex: 1;
	font-size: 14px;
	line-height: 1.6;
	color: #8a8a8a;
}

/* ------------------------------------------------------------------ */
/* Link                                                                */
/* ------------------------------------------------------------------ */

.zcwy .zcwy__link {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba( 94, 158, 255, 0.4 );
	font-size: 15px;
	line-height: 1.4;
	color: #5e9eff;
	text-decoration: none;
	transition: color 250ms ease, border-color 250ms ease;
}

.zcwy .zcwy__arrow {
	transition: transform 250ms cubic-bezier( 0.22, 0.6, 0.2, 1 );
}

.zcwy__card:hover .zcwy__arrow {
	transform: translateX( 4px );
}

.zcwy .zcwy__link--plain {
	cursor: default;
}

/**
 * Whole-card link: the anchor already in the card is stretched over it, so the
 * card becomes one hit target without nesting the title and text inside a
 * link — which would make a screen reader read the whole card as link text.
 */
.zcwy__card.has-cardlink .zcwy__link::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

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

@media ( max-width: 1024px ) {
	.zcwy__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	.zcwy .zcwy__heading {
		font-size: 38px;
	}
}

@media ( max-width: 767px ) {
	.zcwy__grid {
		grid-template-columns: 1fr;
	}

	.zcwy .zcwy__heading {
		font-size: 30px;
		letter-spacing: -1px;
	}

	.zcwy .zcwy__eyebrow {
		font-size: 14px;
	}
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                      */
/* ------------------------------------------------------------------ */

@media ( prefers-reduced-motion: reduce ) {
	.zcwy__card,
	.zcwy .zcwy__link,
	.zcwy .zcwy__arrow {
		transition-duration: 1ms;
	}

	.zcwy__card:hover {
		transform: none;
	}

	.zcwy__card:hover .zcwy__arrow {
		transform: none;
	}
}
