/**
 * ZeltaCode Feature Grid — front-end styles.
 *
 * Grid lines are drawn as a 1px ring around each cell rather than as borders,
 * so adjacent rings collapse into single hairlines and a partly-filled last
 * row still looks correct at any column count.
 */

.zcfg {
	--zcfg-line: 1px;
	--zcfg-line-color: #1e2126;
	--zcfg-cell-bg: #050507;
	--zcfg-marker-color: #4e4e4e;
	--zcfg-marker-size: 9px;
	--zcfg-marker-thickness: 1px;

	background: #000;
	/* Room for the outer ring, which sits outside each cell's box. */
	padding: var(--zcfg-line);
}

.zcfg *,
.zcfg *::before,
.zcfg *::after {
	box-sizing: border-box;
}

.zcfg__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ------------------------------------------------------------------ */
/* Cell                                                                */
/* ------------------------------------------------------------------ */

.zcfg__item {
	position: relative;
	padding: 30px 30px 34px;
	background-color: var(--zcfg-cell-bg);
	box-shadow: 0 0 0 var(--zcfg-line) var(--zcfg-line-color);
	text-align: left;
	transition-property: background-color, transform, box-shadow;
	transition-duration: 0.25s;
	transition-timing-function: ease;
}

/* Stretched link — makes the whole cell clickable without nesting blocks. */
.zcfg__link {
	position: absolute;
	inset: 0;
	z-index: 4;
	text-decoration: none;
}

.zcfg__item.has-link {
	cursor: pointer;
}

.zcfg__link:focus-visible {
	outline: 2px solid #5e9eff;
	outline-offset: -3px;
}

.zcfg .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ */
/* Crosshair markers                                                   */
/* ------------------------------------------------------------------ */

/**
 * The top-left marker of every cell lands exactly on the grid intersections:
 * the outer top-left, each column division along the top edge, and every
 * crossing on the inner row lines. That is the pattern in the reference.
 *
 * z-index sits above sibling cell backgrounds, which would otherwise paint
 * over the half of each marker that overhangs into the next cell.
 */
.zcfg__marker {
	display: none;
	position: absolute;
	z-index: 5;
	width: var(--zcfg-marker-size);
	height: var(--zcfg-marker-size);
	background-image:
		linear-gradient(var(--zcfg-marker-color), var(--zcfg-marker-color)),
		linear-gradient(var(--zcfg-marker-color), var(--zcfg-marker-color));
	background-repeat: no-repeat, no-repeat;
	background-position: center center, center center;
	background-size: 100% var(--zcfg-marker-thickness), var(--zcfg-marker-thickness) 100%;
	pointer-events: none;
}

.zcfg__marker--tl {
	top: 0;
	left: 0;
	transform: translate(-50%, -50%);
}

.zcfg__marker--tr {
	top: 0;
	right: 0;
	transform: translate(50%, -50%);
}

.zcfg__marker--bl {
	bottom: 0;
	left: 0;
	transform: translate(-50%, 50%);
}

.zcfg__marker--br {
	bottom: 0;
	right: 0;
	transform: translate(50%, 50%);
}

/* Default placement: intersections only. */
.zcfg-markers-yes .zcfg__marker--tl {
	display: block;
}

/* Optional placement: all four corners of every cell. */
.zcfg-markers-yes.zcfg-mscope-all-corners .zcfg__marker {
	display: block;
}

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

/**
 * inline-flex, so the cell's own text-align positions it — no extra
 * alignment plumbing needed when the Alignment control changes.
 */
.zcfg__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin-bottom: 24px;
	border: 1px solid #23262c;
	border-radius: 7px;
	background-color: rgba(255, 255, 255, 0.03);
	color: #9aa0aa;
	font-size: 15px;
	line-height: 1;
	vertical-align: top;
	transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.zcfg__icon i,
.zcfg__icon svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	line-height: 1;
}

.zcfg__icon svg {
	fill: currentColor;
}

.zcfg__item.is-highlighted .zcfg__icon {
	border-color: #2f6bff;
	background-color: rgba(94, 158, 255, 0.08);
	color: #5e9eff;
}

/* ------------------------------------------------------------------ */
/* Text                                                                */
/* ------------------------------------------------------------------ */

.zcfg .zcfg__title {
	margin: 0 0 11px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.2px;
	color: #fff;
	transition: color 0.25s ease;
}

.zcfg .zcfg__desc {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.65;
	color: #8a90a0;
	transition: color 0.25s ease;
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.zcfg__item,
	.zcfg__icon,
	.zcfg__title,
	.zcfg__desc {
		transition: none !important;
	}

	.zcfg__item:hover {
		transform: none !important;
	}
}
