/*
Theme Name: VoltRide
Theme URI: https://tenfoldthemes.example/voltride
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: A dark, high-velocity block theme for e-mobility manufacturers and exporters — e-bikes, scooters and charging systems. Ships with 18 patterns, four full-page layouts, a Daylight light style, locally hosted Saira and Barlow fonts and original speed-line vector art.
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: voltride
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
*/

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

/* ---------------------------------------------------------------------------
 * Display type — Saira wide (variable width axis)
 * ------------------------------------------------------------------------- */

h1,
h2,
.wp-block-post-title,
.wp-block-site-title {
	font-stretch: 110%;
}

.voltride-display {
	font-stretch: 118%;
}

/* ---------------------------------------------------------------------------
 * The "//" slash motif + mark safety reset
 * ------------------------------------------------------------------------- */

.voltride-slash {
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-weight: 800;
}

mark {
	background: transparent;
	color: inherit;
}

/* ---------------------------------------------------------------------------
 * Block styles: Group — Panel / Panel (hover charge)
 * Corner-cut panels with a UV gradient top rule.
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-panel,
.wp-block-group.is-style-panel-charge {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--tint);
	clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
	padding: var(--wp--preset--spacing--40);
}

.wp-block-group.is-style-panel::before,
.wp-block-group.is-style-panel-charge::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent));
}

.wp-block-group.is-style-panel-charge {
	transition: background-color 0.2s ease;
}

.wp-block-group.is-style-panel-charge:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--tint) 82%, var(--wp--preset--color--primary));
}

.wp-block-group.is-style-panel-charge:hover::before {
	height: 5px;
}

/* ---------------------------------------------------------------------------
 * Block styles: List — Volt slashes
 * ------------------------------------------------------------------------- */

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

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

ul.is-style-slashes > li::before {
	content: "//";
	position: absolute;
	left: 0;
	top: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-weight: 800;
	color: var(--wp--preset--color--primary);
	letter-spacing: -0.05em;
}

/* ---------------------------------------------------------------------------
 * Block styles: Separator — Volt slash
 * ------------------------------------------------------------------------- */

hr.is-style-volt-slash {
	border: none;
	height: 4px;
	width: 76px;
	/* keep the transparent gaps even if a preset background class is applied */
	background-color: transparent !important;
	background-image: linear-gradient(
		-64deg,
		transparent 0 8%,
		var(--wp--preset--color--primary) 8% 40%,
		transparent 40% 52%,
		var(--wp--preset--color--primary) 52% 84%,
		transparent 84% 100%
	);
}

/* ---------------------------------------------------------------------------
 * 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-style: italic;
	font-weight: 700;
	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);
}

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

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

.wp-block-social-links.is-style-logos-only {
	color: var(--wp--preset--color--contrast);
}

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