/*
Theme Name: Fabrication Station
Theme URI: https://fabricationstation.ca
Author: Fabrication Station & Co.
Description: A custom block theme for Fabrication Station & Co. Every page, header, footer, menu, button and image is edited in the WordPress editor and Site Editor.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fabrication-station
Tags: block-theme, full-site-editing, custom-colors, custom-logo, editor-style, wide-blocks, block-patterns
*/

/* Headings use Archivo's wider cut. */
h1, h2, h3 {
	font-stretch: 112%;
}

/* Header, page and footer sit flush; spacing comes from each section. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

::selection {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

:where(a, button, input, select, textarea, summary, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

/* Outline button: ink line, fills on hover. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 1.5px solid currentColor;
	padding: calc(0.95rem - 1.5px) calc(1.5rem - 1.5px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}
.has-ink-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

/* Text link with arrow (button style "Arrow link"). */
.wp-block-button.is-style-fs-arrow > .wp-block-button__link {
	background: transparent;
	color: currentColor;
	padding: 0.25rem 0;
	border-bottom: 1.5px solid currentColor;
}
.wp-block-button.is-style-fs-arrow > .wp-block-button__link::after {
	content: "\2192";
	display: inline-block;
	margin-left: 0.5em;
	transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.wp-block-button.is-style-fs-arrow > .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--accent);
}
.wp-block-button.is-style-fs-arrow > .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

/* Spec label: small monospaced line (product codes, materials, prices). */
.is-style-fs-spec {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.5;
}

/* Spec list: monospaced rows separated by hairlines. */
ul.is-style-fs-spec-list,
ol.is-style-fs-spec-list {
	list-style: none;
	padding-left: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border-top: 1px solid var(--fs-rule, var(--wp--preset--color--rule));
}
.is-style-fs-spec-list > li {
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--fs-rule, var(--wp--preset--color--rule));
	margin: 0;
}
.has-ink-background-color,
.has-ink-soft-background-color {
	--fs-rule: rgba(243, 241, 236, 0.18);
}

/* Product tag: white card with a hairline frame. */
.wp-block-group.is-style-fs-tag {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--rule);
	transition: border-color 160ms ease-out;
	height: 100%;
}
.wp-block-group.is-style-fs-tag:hover,
.wp-block-group.is-style-fs-tag:focus-within {
	border-color: var(--wp--preset--color--ink);
}
.wp-block-group.is-style-fs-tag .wp-block-image {
	margin: 0;
	background: var(--wp--preset--color--white);
}
.wp-block-group.is-style-fs-tag .wp-block-image img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
	display: block;
}
.wp-block-group.is-style-fs-tag > .wp-block-group {
	flex: 1 1 auto;
}
.wp-block-group.is-style-fs-tag .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--10);
}

/* Ruled section: hairline across the top. */
.wp-block-group.is-style-fs-ruled {
	border-top: 1px solid var(--fs-rule, var(--wp--preset--color--rule));
}

/* Media & text rows: keep photos crisp and cropped. */
.wp-block-media-text .wp-block-media-text__media img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Hero photo: portrait on desktop, shorter crop once columns stack. */
@media (max-width: 781px) {
	.wp-block-image.fs-hero-media img {
		aspect-ratio: 4 / 3 !important;
	}
}

/* Header */
.fs-header .wp-block-site-logo img {
	display: block;
}
.fs-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open,
.fs-header .wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-justification-setting: flex-start;
	--navigation-layout-justify: flex-start;
	--navigation-layout-align: flex-start;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
}
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 3.5rem;
}
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
	font-stretch: 112%;
	letter-spacing: -0.02em;
	gap: 0.75rem;
	align-items: flex-start;
}
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: flex-start;
	text-align: left;
}
@media (max-width: 599px) {
	.fs-header .wp-block-site-title {
		display: none;
	}
	.fs-header .wp-block-buttons .wp-block-button__link {
		padding: 0.7rem 0.9rem;
	}
}

/* Forms (Jetpack Forms and core inputs) follow the square, hairline system. */
.wp-block-jetpack-contact-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea {
	border: 1px solid var(--wp--preset--color--steel-light);
	border-radius: 0;
	background: var(--wp--preset--color--white);
	padding: 0.8rem 0.9rem;
	font: inherit;
	color: var(--wp--preset--color--ink);
}
.wp-block-jetpack-contact-form input:focus,
.wp-block-jetpack-contact-form select:focus,
.wp-block-jetpack-contact-form textarea:focus {
	border-color: var(--wp--preset--color--ink);
}
.wp-block-jetpack-contact-form label {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}
