/*
Theme Name: Capra
Author: Capra Robotics
Description: Custom block theme for Capra Robotics. Its tokens and components follow the Figma file "Capra Website Redesign"; docs/features.md describes each part.
Version: 0.23.80
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: capra
Update URI: false
*/

/* Only what theme.json cannot express lives here. Tokens belong in theme.json,
   components in assets/css/components.css. */

/* WordPress does not set this globally, and the theme's padded components
   (footer action cards, menu items, buttons) all size as if it did — without
   it a 100%-wide card is 100% *plus* its padding and overflows its column. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

::selection {
	background: var(--wp--preset--color--bg-brand);
	color: var(--wp--preset--color--text-inverse);
}

/* A control is not text to copy (Jonas, 12 Nov 2026: a drag or a double-click painted buttons,
   answer cards, menus and pictures navy): buttons, choices made of a label round an input, chips
   and tabs, the header with its drawers and the phone menu, cards that are one link, the step
   row, pictures. Headings, copy, specs, names and the address stay selectable: buyers copy them.
   Not in the Site Editor, where marketing edits these words. */
body:not(.editor-styles-wrapper) :is(button, .wp-block-button__link, label:has(> input), .is-style-capra-chip, .capra-chip, [role="tab"], .capra-units-toggle, .capra-nav, .capra-mmenu, .capra-intent, .capra-tile, .capra-footer__action, .capra-flow__progress, img, video, svg) {
	-webkit-user-select: none;
	user-select: none;
}

/* Fields stay typeable inside those (Safari will not type into a field in an unselectable area). */
:is(input, textarea, select, [contenteditable="true"]) {
	-webkit-user-select: text;
	user-select: text;
}

img {
	display: block;
	max-width: 100%;
}

/* The fixed header overlaps the page, so anything jumped to by an in-page
   link needs to clear it. */
:target {
	scroll-margin-top: calc(var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--24));
}

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