/*
Theme Name: Elliott Metrology
Theme URI: https://metrology.elliottmachinery.com
Author: Elliott Matsuura Canada Inc.
Description: Block theme for Elliott Matsuura Canada's metrology site. Charcoal and green palette, Barlow headings, Inter body text.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 0.1.0
License: Proprietary
Text Domain: elliott-metrology
*/

/* Small refinements theme.json can't express. */

.em-eyebrow {
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.em-card {
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.em-card:hover {
	box-shadow: 0 6px 24px rgba(31, 36, 40, 0.12);
	transform: translateY(-2px);
}

/* Whole-card links on product tiles */
.em-card-link a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.em-card-link {
	position: relative;
}

/* Header */
.em-header .wp-block-navigation a {
	text-decoration: none;
}
.em-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--green-light);
}
.em-header .em-site-label {
	border-left: 1px solid var(--wp--preset--color--charcoal-mid);
	padding-left: 14px;
}

/* Dark sections: links stay readable */
.has-charcoal-background-color a:not(.wp-block-button__link),
.has-charcoal-mid-background-color a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--green-light);
}

/* Outline button on dark backgrounds */
.is-style-outline.em-on-dark .wp-block-button__link {
	color: #fff;
	border-color: #fff;
}
.is-style-outline.em-on-dark .wp-block-button__link:hover {
	color: var(--wp--preset--color--charcoal);
	background: #fff;
}

/* Events list */
.em-events .em-event {
	border-top: 1px solid var(--wp--preset--color--light-grey);
}

/* Brand bar */
.em-brand {
	background: #fff;
	border-radius: 4px;
}
.em-brand img {
	max-height: 44px;
	width: auto !important;
	object-fit: contain;
}

/* Article cards: fixed-ratio images */
.em-post-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
}
.em-post-card .wp-block-post-featured-image {
	margin-bottom: 0;
}

/* Byline: job title under the author name */
.em-job-title {
	display: block;
	font-size: 0.85em;
	color: var(--wp--preset--color--charcoal-mid);
	font-weight: 400;
}

/* Responsive video embeds in articles */
.wp-block-embed.is-type-video iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Learn page category filter as pills */
.em-cat-pills {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.em-cat-pills li a {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid #D5D8DA;
	border-radius: 999px;
	font-size: 14px;
	text-decoration: none;
	color: var(--wp--preset--color--charcoal);
}
.em-cat-pills li a:hover,
.em-cat-pills li.current-cat a {
	border-color: var(--wp--preset--color--green-dark);
	color: var(--wp--preset--color--green-dark);
}

/* How it works diagram */
.em-diagram svg {
	width: 100%;
	height: auto;
	display: block;
}

@media (max-width: 781px) {
	.em-header .em-site-label {
		display: none;
	}
	.em-hide-mobile {
		display: none !important;
	}
}

/* Sections butt up against each other, no white strips */
.wp-site-blocks > * {
	margin-block-start: 0;
}

.em-step-num {
	flex-shrink: 0;
	width: 44px;
	white-space: nowrap;
}

/* Footer links: quiet grey, green on hover */
.em-footer a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--light-grey);
	text-decoration: none;
}
.em-footer a:not(.wp-block-button__link):hover {
	color: var(--wp--preset--color--green-light);
}
.em-step-num + .wp-block-group > h3 {
	margin-top: 0;
}
