/*
Theme Name: Ironcore
Theme URI: https://tenfoldthemes.example/ironcore
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: A catalog-rational block theme for fitness equipment manufacturers — load-rated product grids, steel and weld QC sections, distributor tiers and RFQ bands, all ready the moment you activate.
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: ironcore
Tags: block-theme, full-site-editing, block-patterns, block-styles, custom-colors, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks, one-column, e-commerce, portfolio, blog
*/

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

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

::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

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 — Card / Card (hover lift)
 * ------------------------------------------------------------------------- */

/* Spec-plate card: flat, square, a machined ultramarine top-rule over a
 * hairline frame. No shadow, no lift — the hover shifts the rule to signal
 * orange and deepens the plate to tint (steel-catalog personality). */
.wp-block-group.is-style-card,
.wp-block-group.is-style-card-hover {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-top: 3px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--s);
	padding: var(--wp--preset--spacing--30);
}

.wp-block-group.is-style-card-hover {
	transition: border-top-color 0.2s ease, background-color 0.2s ease;
}

.wp-block-group.is-style-card-hover:hover {
	border-top-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--tint);
}

/* ---------------------------------------------------------------------------
 * Block styles: Paragraph — Spec tag (model / MOQ / rating tags)
 * ------------------------------------------------------------------------- */

/* Open machined tag: no fill, no full outline — a heavy ultramarine left
 * rule under condensed caps. Inherits the pattern's text colour so it reads
 * on light sections and dark panels alike. */
p.is-style-spec-chip {
	display: inline-block;
	width: fit-content;
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	line-height: 1;
	padding: 0.1em 0 0.16em 0.55em;
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * Block styles: Paragraph — Load plate (rating chip stamped like a spec plate)
 * ------------------------------------------------------------------------- */

p.is-style-load-plate {
	display: inline-block;
	width: fit-content;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-left: 3px solid var(--wp--preset--color--accent);
	border-radius: var(--wp--custom--radius--m);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.0625rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
	padding: 0.3em 0.65em 0.36em;
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * Block styles: Separator — Knurl (fine crosshatch band, like bar knurling)
 * ------------------------------------------------------------------------- */

hr.is-style-knurl {
	border: none;
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
	height: 14px;
	width: 100%;
	max-width: none;
	opacity: 1;
	background:
		repeating-linear-gradient(45deg, var(--wp--preset--color--border) 0 1px, transparent 1px 5px),
		repeating-linear-gradient(-45deg, var(--wp--preset--color--border) 0 1px, transparent 1px 5px);
}

/* ---------------------------------------------------------------------------
 * Block styles: List — Checkmarks
 * ------------------------------------------------------------------------- */

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

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

ul.is-style-checkmarks > li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * Spec tables (rack series comparison, tier tables)
 * ------------------------------------------------------------------------- */

.wp-block-table.ironcore-spec-table table {
	border-collapse: collapse;
	border: 1px solid var(--wp--preset--color--border);
}

.wp-block-table.ironcore-spec-table th {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.125em;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: left;
	border: 1px solid var(--wp--preset--color--contrast);
	padding: 0.55rem 0.875rem;
}

.wp-block-table.ironcore-spec-table td {
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.6rem 0.875rem;
}

.wp-block-table.ironcore-spec-table tbody tr:nth-child(even) {
	background: var(--wp--preset--color--tint);
}

.wp-block-table.ironcore-spec-table figcaption {
	text-align: left;
	margin-top: 0.625rem;
}

/* ---------------------------------------------------------------------------
 * Details / FAQ affordance
 * ------------------------------------------------------------------------- */

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

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

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.4em;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	transition: transform 0.2s ease;
}

.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-keyed so style variations remap them
 * ------------------------------------------------------------------------- */

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

/* ---------------------------------------------------------------------------
 * 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: 1.5px;
}

.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;
}
