/* Group Tactical Security (GTAC) base layer: focus ring, selection, reduced motion, anchor offsets, one page edge.
   Token variables only (raw values: 0, 1px hairlines). Loaded on the front end and in the editor. */

/* a mouse click or a tap shows no ring and no tap flash; the keyboard keeps the ring below */
html { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
/* containers WordPress focuses by script (the menu panel, dialogs, skip targets) show no ring */
:is([tabindex="-1"], .wp-block-navigation__responsive-container, .wp-block-navigation__responsive-dialog, dialog):focus { outline: none; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--border--focus) solid var(--wp--preset--color--focus);
	outline-offset: var(--wp--custom--border--focus-offset);
}

/* Dark and photo grounds use the inverse focus ring. */
:where(.is-style-section-deep, .wp-block-cover, .gt-footer, .gt-header-wrap, .gt-drawer, .gt-callbar) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--focus-inverse);
}

/* A light card on a dark ground (the contact form card) takes the light-ground ring again. */
.gt-form-card :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.gt-form-card.gt-form-card [tabindex]:focus-visible {
	outline-color: var(--wp--preset--color--focus);
}

::selection {
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--contrast);
}

html {
	/* edge dots bleed to the screen edge (100vw): clip, never scroll sideways */
	overflow-x: clip;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	/* one page edge everywhere: TT5's fluid root padding becomes the site gutter, so every section lines up with the header */
	--wp--style--root--padding-left: var(--wp--custom--layout--gutter-mobile);
	--wp--style--root--padding-right: var(--wp--custom--layout--gutter-mobile);
}

@media (min-width: 782px) {
	body {
		--wp--style--root--padding-left: var(--wp--custom--layout--gutter);
		--wp--style--root--padding-right: var(--wp--custom--layout--gutter);
	}
}

/* anchors land below the sticky header */
:target {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height-mobile) + var(--wp--preset--spacing--40));
}

@media (min-width: 1024px) {
	:target {
		scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--40));
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
