/*
Theme Name:   SkilD
Theme URI:    https://skild.co.in
Author:       SkilD
Description:  SkilD block theme. Token layer built verbatim from SKILD-DESIGN-CONTEXT.md PART D. Crimson leads, navy contains. No Elementor, no CDN, no dark mode.
Version:      0.12.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  skild
*/

/* ------------------------------------------------------------------
   This file carries ONLY what theme.json cannot express.
   Every value below traces to SKILD-DESIGN-CONTEXT.md PART D or M.1.
   If a rule can live in theme.json, it lives there, not here.
   ------------------------------------------------------------------ */

/* MEASURE - PART D.9 "body 62-78 characters, lead max 56ch".
   Applied to DIRECT children of the content flow only, so a paragraph
   inside a card, a column or a panel is not squeezed to 74ch inside an
   already-narrow container. theme.json cannot express "only when not
   nested"; a direct-child selector can. */
.entry-content > p,
.wp-site-blocks > p,
.is-layout-flow > p.skild-measure {
	max-width: var(--wp--custom--measure--body);
}
.entry-content > p.has-lead-font-size,
.wp-site-blocks > p.has-lead-font-size {
	max-width: var(--wp--custom--measure--lead);
}

/* FOCUS - PART M.1: focus is ALWAYS visible, never outline:none without an
   equal replacement. The crimson ring disappears on crimson, so it inverts
   on every dark ground. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: none;
	box-shadow: var(--wp--custom--focus--ring);
	border-radius: var(--wp--custom--radius--sm);
}
:where(
	.has-crimson-background-color,
	.has-crimson-deep-background-color,
	.has-navy-background-color,
	.has-ink-background-color
) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	box-shadow: var(--wp--custom--focus--ring-on-dark);
}

/* TARGET SIZE - PART M.1 / PART G: minimum 44x44, adjacent gap >= 8px. */
:where(.wp-block-button__link, .wp-block-navigation-item__content) {
	min-height: var(--wp--custom--target--min);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.wp-block-buttons { gap: var(--wp--custom--target--gap); }

/* SKIP LINK - PART M.1: first focusable element on any page with nav. */
.skild-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 12px 20px;
	background: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 700;
	border-bottom-right-radius: var(--wp--custom--radius--md);
	text-decoration: none;
}
.skild-skip-link:focus {
	left: 0;
}

/* RADIUS - PART D.10 mobile override, verbatim:
   @media max-width:600px -> --sk-r-2xl:18px; --sk-r-3xl:20px */
@media (max-width: 600px) {
	:root {
		--wp--custom--radius--xxl: 18px;
		--wp--custom--radius--xxxl: 20px;
	}
}

/* NUMERALS - PART E.5 and PART D.12: tabular numerals on every figure in a
   table, a price or a stat band. */
:where(table, .skild-stat, .skild-price, .wp-block-table) {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

/* TRACKING BIND - Stage B (B4). The display tracking and leading tokens bind
   to the display SIZE wherever it is used. theme.json cannot address a
   font-size preset class, so the bind lives here. This closes the
   unbound-display-value defect that inverted the measured ladder. */
.has-disp-font-size {
	letter-spacing: var(--wp--custom--tracking--disp);
	line-height: var(--wp--custom--leading--disp);
}

/* MOTION - PART D.10: honour prefers-reduced-motion in every HTML output. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* NO DARK MODE. PART D.11: web dark mode does not exist and is not in scope.
   There is deliberately no prefers-color-scheme block in this theme. The only
   file in the system licensed to carry one is icons/icon.svg, which is
   consumed by browser chrome rather than by a SkilD page. */
