/*
Theme Name: Kelvin
Theme URI: https://tenfoldthemes.example/kelvin
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: A product-stage block theme for home and kitchen appliance manufacturers — thermal-dial artwork, spec-chip product grids, OEM/ODM and RFQ sections, 18 patterns, four full-page layouts and a Midnight Steel dark style.
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: kelvin
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
*/

/* ---------------------------------------------------------------------------
 * Palette usage guard (accessibility — keep both palettes AA)
 * ---------------------------------------------------------------------------
 * accent (#C24A22 default / #E8825A midnight-steel) is a LARGE-TEXT / dark-band
 * / decorative color only. In the DEFAULT palette accent on base is 4.59:1 and
 * on tint is 4.18:1 — both BELOW the 4.5:1 AA threshold for small body text.
 * Never set accent as the text color on small body copy over base or tint; use
 * primary (5.9:1 on base) or contrast instead. accent as large text (>=24px or
 * 19px bold) and on the contrast band remains AA-safe.
 * Icon SVGs hardcode stroke #22668A; the Midnight Steel variation inverts them
 * via styles.css so they clear 3:1 non-text contrast on the dark cards.
 * ------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
 * Focus visibility, selection & motion
 * ------------------------------------------------------------------------- */

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

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

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 style: Group — Spec card (steel hairline top-rule)
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-spec-card {
	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--m);
	box-shadow: var(--wp--preset--shadow--card);
	padding: var(--wp--preset--spacing--40);
	transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.wp-block-group.is-style-spec-card:hover {
	border-top-color: var(--wp--preset--color--accent);
	box-shadow: var(--wp--preset--shadow--lift);
}

/* ---------------------------------------------------------------------------
 * Block style: Group — Spec chip (unit-suffix pill)
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-spec-chip {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--full);
	padding: 0.3rem 0.95rem;
}

.wp-block-group.is-style-spec-chip p {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--contrast);
	margin: 0;
}

.wp-block-group.is-style-spec-chip p strong {
	font-weight: 800;
	color: var(--wp--preset--color--primary);
}

/* ---------------------------------------------------------------------------
 * Block style: Separator — Thermal rule (cold → hot)
 * ------------------------------------------------------------------------- */

hr.is-style-thermal-rule {
	border: none;
	height: 3px;
	width: 88px;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent));
	border-radius: 999px;
	opacity: 1;
}

/* ---------------------------------------------------------------------------
 * Block style: List — Dial marks (thermal ring bullets)
 * ------------------------------------------------------------------------- */

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

ul.is-style-dial-marks > li {
	position: relative;
	padding-left: 1.7em;
	margin-bottom: 0.6em;
}

ul.is-style-dial-marks > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 0.9em;
	height: 0.9em;
	border-radius: 50%;
	background: conic-gradient(from 200deg, var(--wp--preset--color--primary) 0deg, var(--wp--preset--color--accent) 300deg, var(--wp--preset--color--primary) 360deg);
	-webkit-mask: radial-gradient(farthest-side, transparent 52%, #000 56%);
	mask: radial-gradient(farthest-side, transparent 52%, #000 56%);
}

/* ---------------------------------------------------------------------------
 * 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.35em;
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	transition: transform 0.2s ease;
}

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

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

/* ---------------------------------------------------------------------------
 * 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%;
}

mark {
	background: transparent;
	color: inherit;
}

.wp-block-table table {
	border-collapse: collapse;
}

.wp-block-table td,
.wp-block-table th {
	border-color: var(--wp--preset--color--border);
}
/* ---------------------------------------------------------------------------
 * 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;
}
