/*
 * Tools Icon — projects grid (I_projects.html) and project detail pages.
 * Linked by ProjectSyncService with ?v=ASSET_VERSION; bump that constant
 * whenever this file changes (GoDaddy sends no Cache-Control).
 */
:root {
	--ti-green: #bbd636;
	--ti-green-ink: #6f8412;
	--ti-ink: #1d1d1b;
	--ti-muted: #7c7c7c;
	--ti-tile: #1c1c1c;
	--ti-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------------------------------------------------------------- grid */

.ti-proj-media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: var(--ti-tile);
}

.ti-proj-media .ti-proj-cover,
.ti-proj-color img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .9s var(--ti-ease);
}

/* Colour twin of the grayscale cover, injected on first hover by js/ti-projects.js */
.ti-proj-color {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .6s ease;
}

.ti-proj-card:hover .ti-proj-color.is-loaded,
.ti-proj-card:focus-visible .ti-proj-color.is-loaded {
	opacity: 1;
}

.ti-proj-card:hover .ti-proj-media img,
.ti-proj-card:focus-visible .ti-proj-media img {
	transform: scale(1.045);
}

.ti-proj-card:focus-visible {
	outline: 3px solid var(--ti-green);
	outline-offset: 3px;
}

/* The theme floods the whole tile with 80% black on hover, which would bury the
   colour reveal. Keep only a floor gradient that carries the caption. */
.thumb-info .thumb-info-wrapper.ti-proj-media:after {
	inset: 0;
	border-radius: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .28) 42%, rgba(0, 0, 0, 0) 68%);
}

.thumb-info.thumb-info-centered-icons .ti-proj-media .thumb-info-action {
	top: auto;
	bottom: 24px;
	height: auto;
	padding: 0 16px;
	transform: translate3d(0, 12px, 0);
}

.thumb-info:hover.thumb-info-centered-icons .ti-proj-media .thumb-info-action {
	transform: translate3d(0, 0, 0);
}

.ti-proj-media .thumb-info-action h4 {
	text-align: center;
}

/* Touch screens never hover: show the caption permanently so tiles are labelled. */
@media (hover: none) {
	.thumb-info .thumb-info-wrapper.ti-proj-media:after {
		opacity: 1;
	}
	.thumb-info.thumb-info-centered-icons .ti-proj-media .thumb-info-action {
		opacity: 1;
		transform: none;
	}
}

/* -------------------------------------------------------------- detail */

.ti-proj-gallery {
	margin-bottom: 2.5rem;
}

.ti-proj-feature,
.ti-proj-thumbs a {
	display: block;
	position: relative;
	overflow: hidden;
	background: var(--ti-tile);
}

.ti-proj-feature {
	margin-bottom: 12px;
}

.ti-proj-feature img,
.ti-proj-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .7s var(--ti-ease);
}

.ti-proj-thumbs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.ti-proj-gallery a:hover img {
	transform: scale(1.04);
}

/* Zoom affordance */
.ti-proj-gallery a:after {
	content: "\f00e";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--ti-green);
	color: var(--ti-ink);
	font-size: 15px;
	opacity: 0;
	transform: scale(.8);
	transition: opacity .25s ease, transform .25s var(--ti-ease);
}

.ti-proj-gallery a:hover:after,
.ti-proj-gallery a:focus-visible:after {
	opacity: 1;
	transform: scale(1);
}

.ti-proj-gallery a:focus-visible {
	outline: 3px solid var(--ti-green);
	outline-offset: 2px;
}

.ti-proj-desc {
	max-width: 68ch;
	line-height: 1.85;
	margin-bottom: 2rem;
}

.ti-proj-facts li + li {
	margin-top: 1.1rem;
}

.ti-proj-cta {
	background: var(--ti-ink);
	padding: 28px 24px;
	margin-bottom: 1.5rem;
}

.ti-proj-cta p {
	margin: 0 0 16px;
	color: #fff;
	font-weight: 600;
	font-size: 1.05rem;
	line-height: 1.4;
}

.ti-btn {
	display: inline-block;
	background: var(--ti-green);
	color: var(--ti-ink) !important;
	font-weight: 700;
	padding: 12px 26px;
	text-decoration: none !important;
	transition: background-color .2s ease, transform .2s var(--ti-ease);
}

.ti-btn:hover,
.ti-btn:focus-visible {
	background: #cde55a;
	transform: translateY(-2px);
}

.ti-proj-nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	margin-top: 3.5rem;
	padding: 2rem 0 3.5rem;
	border-top: 1px solid rgba(0, 0, 0, .1);
}

.ti-proj-nav a {
	text-decoration: none !important;
}

.ti-proj-nav-link span {
	display: block;
	font-size: .75rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ti-muted);
}

.ti-proj-nav-link strong {
	display: block;
	font-size: 1.15rem;
	color: var(--ti-ink);
	transition: color .2s ease;
}

.ti-proj-nav-link:hover strong {
	color: var(--ti-green-ink);
}

.ti-proj-nav-link.is-next {
	text-align: right;
}

.ti-proj-nav-all {
	border: 1px solid var(--ti-ink);
	padding: 10px 22px;
	color: var(--ti-ink) !important;
	font-weight: 600;
	transition: background-color .2s ease, color .2s ease;
}

.ti-proj-nav-all:hover {
	background: var(--ti-ink);
	color: #fff !important;
}

@media (max-width: 575px) {
	.ti-proj-thumbs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
	.ti-proj-nav {
		grid-template-columns: 1fr 1fr;
	}
	.ti-proj-nav-all {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-self: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ti-proj-media img,
	.ti-proj-color,
	.ti-proj-gallery img,
	.ti-proj-gallery a:after,
	.ti-btn {
		transition: none !important;
	}
	.ti-proj-card:hover .ti-proj-media img,
	.ti-proj-gallery a:hover img {
		transform: none;
	}
}
