/**
 * Unified Tool Categories archive.
 * Loaded only on the tool_categories taxonomy.
 */

body.tax-tool_categories,
body.page-template-page-all-tools {
	--tga-archive-navy: #0f172a;
	--tga-archive-purple: #6528f7;
	--tga-archive-purple-dark: #4c1dca;
	--tga-archive-muted: #5d6678;
	--tga-archive-line: #e3e7f0;
	--tga-archive-surface: #f6f5ff;
	--tga-archive-white: #fff;
	background: #f8f9fc;
}

body.tax-tool_categories .site-content > .ast-container,
body.page-template-page-all-tools .site-content > .ast-container {
	display: block;
	width: 100%;
	max-width: none;
	padding: 0;
}

body.tax-tool_categories #primary.tga-tool-archive,
body.page-template-page-all-tools #primary.tga-tool-archive {
	width: 100%;
	margin: 0;
	padding: 0;
}

.tga-tool-archive,
.tga-tool-archive *,
.tga-tool-archive *::before,
.tga-tool-archive *::after {
	box-sizing: border-box;
}

.tga-tool-archive {
	color: var(--tga-archive-navy);
	font-family: inherit;
}

.tga-tool-shell {
	width: min(1180px, calc(100% - 48px));
	margin-inline: auto;
}

.tga-tool-hero {
	position: relative;
	overflow: hidden;
	padding: 88px 0 52px;
	background:
		radial-gradient(circle at 86% 10%, rgba(113, 70, 255, 0.38), transparent 31%),
		radial-gradient(circle at 62% 90%, rgba(51, 102, 255, 0.2), transparent 38%),
		linear-gradient(135deg, #080f24 0%, #111936 58%, #16183d 100%);
	color: var(--tga-archive-white);
}

.tga-tool-hero::before {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
	content: "";
	pointer-events: none;
}

.tga-tool-hero .tga-tool-shell {
	position: relative;
	z-index: 1;
}

.tga-tool-hero__back {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 28px;
	color: rgba(255, 255, 255, 0.76);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.tga-tool-hero__back:hover,
.tga-tool-hero__back:focus-visible {
	color: #fff;
}

.tga-tool-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 64px;
	align-items: end;
}

.tga-tool-hero__copy {
	width: 100%;
	min-width: 0;
	max-width: 780px;
}

.tga-tool-eyebrow {
	display: block;
	margin-bottom: 14px;
	color: #a997ff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.tga-tool-hero h1 {
	width: 100%;
	max-width: 100%;
	margin: 0;
	overflow: visible;
	color: #fff;
	font-size: clamp(36px, 4.7vw, 60px);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1.02;
	white-space: nowrap;
}

.tga-tool-hero__description {
	max-width: 720px;
	margin-top: 22px;
	color: rgba(255, 255, 255, 0.78);
	font-size: clamp(17px, 2vw, 20px);
	line-height: 1.65;
}

.tga-tool-hero__description p {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.tga-tool-hero__summary {
	display: flex;
	gap: 12px;
}

.tga-tool-hero__summary > div {
	min-width: 112px;
	padding: 17px 20px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.07);
	backdrop-filter: blur(10px);
}

.tga-tool-hero__summary strong,
.tga-tool-hero__summary span {
	display: block;
}

.tga-tool-hero__summary strong {
	color: #fff;
	font-size: 30px;
	line-height: 1;
}

.tga-tool-hero__summary span {
	margin-top: 7px;
	color: rgba(255, 255, 255, 0.68);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.tga-tool-category-nav {
	display: flex;
	gap: 10px;
	margin-top: 42px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	overflow-x: auto;
	scrollbar-width: none;
}

.tga-tool-category-nav::-webkit-scrollbar {
	display: none;
}

.tga-tool-category-nav a {
	flex: 0 0 auto;
	padding: 10px 15px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
	color: rgba(255, 255, 255, 0.82);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: 160ms ease;
}

.tga-tool-category-nav a:hover,
.tga-tool-category-nav a:focus-visible {
	border-color: rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	transform: translateY(-1px);
}

.tga-tool-groups {
	padding-top: 70px;
	padding-bottom: 86px;
}

.tga-tool-group {
	scroll-margin-top: 100px;
}

.tga-tool-group + .tga-tool-group {
	margin-top: 76px;
	padding-top: 72px;
	border-top: 1px solid var(--tga-archive-line);
}

.tga-tool-group__header {
	display: flex;
	gap: 30px;
	align-items: end;
	justify-content: space-between;
	margin-bottom: 28px;
}

.tga-tool-group__header > div {
	max-width: 760px;
}

.tga-tool-group__count {
	display: block;
	margin-bottom: 8px;
	color: var(--tga-archive-purple);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.tga-tool-group h2 {
	margin: 0;
	color: var(--tga-archive-navy);
	font-size: clamp(28px, 4vw, 38px);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.15;
}

.tga-tool-group__header p {
	margin: 10px 0 0;
	color: var(--tga-archive-muted);
	font-size: 15px;
	line-height: 1.65;
}

.tga-tool-group__view {
	flex: 0 0 auto;
	display: inline-flex;
	gap: 8px;
	align-items: center;
	padding-bottom: 4px;
	border-bottom: 1px solid currentColor;
	color: var(--tga-archive-purple);
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

.tga-tool-group__view:hover,
.tga-tool-group__view:focus-visible {
	color: var(--tga-archive-purple-dark);
}

.tga-tool-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.tga-tool-card {
	display: flex;
	min-width: 0;
	overflow: hidden;
	flex-direction: column;
	margin: 0;
	border: 1px solid var(--tga-archive-line);
	border-radius: 18px;
	background: var(--tga-archive-white);
	box-shadow: 0 10px 32px rgba(15, 23, 42, 0.055);
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tga-tool-card:hover {
	border-color: #cfc7ff;
	box-shadow: 0 18px 44px rgba(42, 27, 92, 0.11);
	transform: translateY(-4px);
}

.tga-tool-card__visual {
	display: block;
	overflow: hidden;
	aspect-ratio: 1.904 / 1;
	background: #0b1330;
	text-decoration: none;
}

.tga-tool-card__image {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	object-fit: cover;
	transition: transform 240ms ease;
}

.tga-tool-card:hover .tga-tool-card__image {
	transform: scale(1.025);
}

.tga-tool-card__fallback {
	position: relative;
	display: flex;
	width: 100%;
	height: 100%;
	padding: 24px;
	flex-direction: column;
	justify-content: space-between;
	background:
		radial-gradient(circle at 80% 20%, rgba(100, 52, 255, 0.72), transparent 28%),
		linear-gradient(135deg, #070f29, #172456);
	color: #fff;
}

.tga-tool-card__fallback::after {
	position: absolute;
	right: -28px;
	bottom: -36px;
	width: 150px;
	height: 150px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	content: "";
}

.tga-tool-card__fallback svg {
	width: 52px;
	height: 52px;
	fill: none;
	stroke: #a997ff;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.tga-tool-card__fallback > span {
	position: relative;
	z-index: 1;
	max-width: 88%;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.18;
}

.tga-tool-card__body {
	display: flex;
	min-height: 235px;
	padding: 25px;
	flex: 1;
	flex-direction: column;
}

.tga-tool-card__category {
	align-self: flex-start;
	margin-bottom: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	background: #f0edff;
	color: var(--tga-archive-purple);
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

.tga-tool-card__title {
	margin: 0;
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.25;
}

.tga-tool-card__title a {
	color: var(--tga-archive-navy);
	text-decoration: none;
}

.tga-tool-card__title a:hover,
.tga-tool-card__title a:focus-visible {
	color: var(--tga-archive-purple);
}

.tga-tool-card__excerpt {
	display: -webkit-box;
	margin: 12px 0 20px;
	overflow: hidden;
	color: var(--tga-archive-muted);
	font-size: 14px;
	line-height: 1.65;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.tga-tool-card__link {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	align-self: flex-start;
	margin-top: auto;
	color: var(--tga-archive-purple);
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

.tga-tool-card__link svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	transition: transform 160ms ease;
}

.tga-tool-card__link:hover svg,
.tga-tool-card__link:focus-visible svg {
	transform: translateX(3px);
}

.tga-tool-empty {
	padding: 72px 30px;
	border: 1px solid var(--tga-archive-line);
	border-radius: 20px;
	background: #fff;
	text-align: center;
}

.tga-tool-empty__icon {
	display: inline-grid;
	width: 56px;
	height: 56px;
	margin-bottom: 18px;
	border-radius: 16px;
	place-items: center;
	background: #f0edff;
	color: var(--tga-archive-purple);
	font-size: 26px;
	font-weight: 800;
}

.tga-tool-empty h2 {
	margin: 0;
	font-size: 30px;
}

.tga-tool-empty p {
	max-width: 580px;
	margin: 12px auto 24px;
	color: var(--tga-archive-muted);
	line-height: 1.7;
}

.tga-tool-archive-cta {
	display: flex;
	gap: 42px;
	align-items: center;
	justify-content: space-between;
	margin-top: 84px;
	padding: 48px 52px;
	border-radius: 22px;
	background:
		radial-gradient(circle at 90% 0%, rgba(141, 100, 255, 0.42), transparent 30%),
		linear-gradient(135deg, #101936, #161640);
	color: #fff;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.tga-tool-archive-cta > div {
	max-width: 740px;
}

.tga-tool-archive-cta > div > span {
	color: #aa9aff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.tga-tool-archive-cta h2 {
	margin: 8px 0 10px;
	color: #fff;
	font-size: clamp(27px, 4vw, 38px);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.15;
}

.tga-tool-archive-cta p {
	margin: 0;
	color: rgba(255, 255, 255, 0.72);
	font-size: 15px;
	line-height: 1.7;
}

.tga-tool-button {
	display: inline-flex;
	min-height: 48px;
	padding: 13px 20px;
	gap: 9px;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--tga-archive-purple);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

.tga-tool-button:hover,
.tga-tool-button:focus-visible {
	background: var(--tga-archive-purple-dark);
	color: #fff;
}

.tga-tool-button--light {
	flex: 0 0 auto;
	background: #fff;
	color: #161640;
}

.tga-tool-button--light:hover,
.tga-tool-button--light:focus-visible {
	background: #eeeaff;
	color: #161640;
}

.tga-tool-archive a:focus-visible {
	outline: 3px solid #9d8aff;
	outline-offset: 3px;
}

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

	.tga-tool-hero__grid {
		gap: 34px;
	}

	.tga-tool-archive-cta {
		padding: 42px;
	}
}

@media (max-width: 760px) {
	.tga-tool-shell {
		width: min(100% - 32px, 620px);
	}

	.tga-tool-hero {
		padding: 58px 0 34px;
	}

	.tga-tool-hero__grid {
		grid-template-columns: 1fr;
	}

	.tga-tool-hero h1 {
		font-size: clamp(28px, 8vw, 42px);
	}

	.tga-tool-hero__summary {
		justify-content: flex-start;
	}

	.tga-tool-category-nav {
		margin-top: 32px;
	}

	.tga-tool-groups {
		padding-top: 48px;
		padding-bottom: 60px;
	}

	.tga-tool-group + .tga-tool-group {
		margin-top: 52px;
		padding-top: 48px;
	}

	.tga-tool-group__header {
		display: block;
	}

	.tga-tool-group__view {
		margin-top: 16px;
	}

	.tga-tool-grid {
		grid-template-columns: 1fr;
	}

	.tga-tool-card__body {
		min-height: 0;
	}

	.tga-tool-card__link {
		margin-top: 20px;
	}

	.tga-tool-archive-cta {
		display: block;
		margin-top: 58px;
		padding: 34px 26px;
	}

	.tga-tool-archive-cta .tga-tool-button {
		width: 100%;
		margin-top: 24px;
	}
}

@media (max-width: 420px) {
	.tga-tool-hero__summary {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tga-tool-hero__summary > div {
		min-width: 0;
		padding: 15px;
	}

	.tga-tool-card__body {
		padding: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tga-tool-card,
	.tga-tool-card__image,
	.tga-tool-card__link svg,
	.tga-tool-category-nav a {
		transition: none;
	}
}
