/*
Theme Name: Foundry
Theme URI: https://tenfoldthemes.example/foundry
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: An industrial-brutalist block theme for machinery manufacturers and automation exporters — 18 patterns, four full-page layouts, spec-plate cards, hazard-stripe dividers, a Nightshift dark style and locally hosted variable fonts, all editable in the Site Editor.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: foundry
Tags: block-theme, full-site-editing, block-patterns, block-styles, custom-colors, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks, one-column, portfolio, blog
*/

/* ---------------------------------------------------------------------------
 * Focus visibility & motion
 * ------------------------------------------------------------------------- */

:where(a, button, input, summary, textarea, select, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

::selection {
	background: #F5B301;
	color: #191C1D;
}

a,
.wp-block-button__link,
.wp-element-button {
	transition: var(--wp--custom--transition);
}

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

/* ---------------------------------------------------------------------------
 * Block styles: Group — Spec plate (heavy welded border, no shadow ever)
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-spec-plate {
	background: var(--wp--preset--color--base);
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 0;
	padding: var(--wp--preset--spacing--40);
	transition: border-color 0.15s ease;
}

.wp-block-group.is-style-spec-plate:hover {
	border-color: var(--wp--preset--color--primary);
}

/* ---------------------------------------------------------------------------
 * Block styles: Group — Hazard stripe top edge
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-hazard-top {
	position: relative;
	border-top: none;
}

.wp-block-group.is-style-hazard-top::before {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 12px;
	background: var(--wp--custom--hazard);
}

/* ---------------------------------------------------------------------------
 * Block styles: Separator — Hazard stripe
 * ------------------------------------------------------------------------- */

hr.is-style-hazard {
	border: none;
	height: 14px;
	width: 100%;
	max-width: none;
	background: var(--wp--custom--hazard);
	border-radius: 0;
	opacity: 1;
}

/* ---------------------------------------------------------------------------
 * Block styles: List — Bolted (square weld-nut markers)
 * ------------------------------------------------------------------------- */

ul.is-style-bolted {
	list-style: none;
	padding-left: 0;
}

ul.is-style-bolted > li {
	padding-left: 1.6em;
	position: relative;
	margin-bottom: 0.55em;
}

ul.is-style-bolted > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.42em;
	width: 0.7em;
	height: 0.7em;
	background: var(--wp--preset--color--primary);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--contrast);
}

/* ---------------------------------------------------------------------------
 * Details / FAQ affordance — stencil plus marker
 * ------------------------------------------------------------------------- */

.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2.25rem;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1.35em;
	height: 1.35em;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
}

.wp-block-details[open] summary::after {
	content: "−";
}

.wp-block-details > :not(summary) {
	font-weight: 400;
	color: var(--wp--preset--color--contrast-2);
}

/* ---------------------------------------------------------------------------
 * Footer social icons — palette-driven so style variations remap correctly
 * ------------------------------------------------------------------------- */

.foundry-footer-social.wp-block-social-links .wp-block-social-link,
.foundry-footer-social.wp-block-social-links .wp-block-social-link a {
	color: var(--wp--preset--color--base);
}

.foundry-footer-social.wp-block-social-links .wp-block-social-link a:hover {
	color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------------------
 * Small refinements
 * ------------------------------------------------------------------------- */

.wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 2px;
	border-radius: 0;
}

.wp-block-image img {
	height: auto;
	max-width: 100%;
}
/* ---------------------------------------------------------------------------
 * Palette-slug guard: the standard palette includes a slug named "border".
 * When used as a *text* color, WordPress emits `.has-border-color`, which core
 * pairs with `:where(.has-border-color){border-style:solid}`; with the default
 * medium width that paints a stray ~3px box around the text. Zero the width
 * here — genuine borders set an explicit width (inline or via block-style
 * classes) that overrides this 0-specificity rule.
 * ------------------------------------------------------------------------- */
:where(.has-border-color) {
	border-width: 0;
}
