/*!
 * HiveMTD design tokens
 * Single source of truth for brand colors, type scale, spacing, motion.
 * Phase 1b — extend incrementally; do not let pages reach for raw hex codes.
 */

:root {
	/* Brand */
	--hv-primary: #128A8C;
	--hv-primary-text: #0E6D6F;       /* WCAG AA on #FFFFFF for body text */
	--hv-accent: #29CB97;
	--hv-dark: #1D2023;

	/* Neutrals */
	--hv-gray-50: #F8FAFA;
	--hv-gray-100: #EEF2F2;
	--hv-gray-300: #C8D2D2;
	--hv-gray-500: #6B7878;
	--hv-gray-700: #3A4444;
	--hv-gray-900: #1D2023;

	/* Surface tokens */
	--hv-surface-bg: #FFFFFF;
	--hv-surface-bg-alt: var(--hv-gray-50);
	--hv-surface-border: var(--hv-gray-100);

	/* Radius */
	--hv-radius-sm: 4px;
	--hv-radius-md: 8px;
	--hv-radius-lg: 16px;

	/* Shadow */
	--hv-shadow-sm: 0 1px 2px rgba(29, 32, 35, 0.08);
	--hv-shadow-md: 0 4px 12px rgba(29, 32, 35, 0.10);
	--hv-shadow-lg: 0 12px 32px rgba(29, 32, 35, 0.12);

	/* Type — fluid scale with clamp(min, fluid, max) */
	--hv-type-display: clamp(2.5rem, 4.2vw + 1rem, 4.5rem);
	--hv-type-h1: clamp(2rem, 3.2vw + 0.8rem, 3.25rem);
	--hv-type-h2: clamp(1.625rem, 2.4vw + 0.7rem, 2.5rem);
	--hv-type-h3: clamp(1.375rem, 1.6vw + 0.6rem, 1.875rem);
	--hv-type-h4: 1.25rem;
	--hv-type-body: 1rem;
	--hv-type-small: 0.875rem;
	--hv-line-tight: 1.15;
	--hv-line-snug: 1.35;
	--hv-line-normal: 1.6;

	/* Layout */
	--hv-content-max: 1200px;
	--hv-content-pad: clamp(1rem, 4vw, 2rem);

	/* Motion */
	--hv-ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
	--hv-dur-fast: 120ms;
	--hv-dur-base: 220ms;
}

/* Utility surfaces — opt-in only; safe to ignore until Phase 3 templates use them. */
.hv-bg-primary  { background-color: var(--hv-primary); color: #FFFFFF; }
.hv-bg-accent   { background-color: var(--hv-accent); color: var(--hv-dark); }
.hv-bg-dark     { background-color: var(--hv-dark); color: #FFFFFF; }
.hv-bg-soft     { background-color: var(--hv-surface-bg-alt); color: var(--hv-dark); }
.hv-text-primary { color: var(--hv-primary-text); }
.hv-text-accent  { color: var(--hv-accent); }
.hv-text-muted   { color: var(--hv-gray-500); }

/* Buttons — minimum tap target 44x44 for WCAG AA / mobile. */
.hv-btn,
.hv-btn-primary,
.hv-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.75rem 1.5rem;
	border-radius: var(--hv-radius-md);
	border: 1px solid transparent;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--hv-dur-base) var(--hv-ease-standard),
	            color var(--hv-dur-base) var(--hv-ease-standard),
	            border-color var(--hv-dur-base) var(--hv-ease-standard),
	            box-shadow var(--hv-dur-base) var(--hv-ease-standard);
}

.hv-btn-primary {
	background-color: var(--hv-primary);
	color: #FFFFFF;
}
.hv-btn-primary:hover,
.hv-btn-primary:focus-visible {
	background-color: var(--hv-primary-text);
	box-shadow: var(--hv-shadow-md);
}

.hv-btn-secondary {
	background-color: transparent;
	color: var(--hv-primary-text);
	border-color: var(--hv-primary);
}
.hv-btn-secondary:hover,
.hv-btn-secondary:focus-visible {
	background-color: var(--hv-primary);
	color: #FFFFFF;
}

/* Focus ring for keyboard navigation — never disable visible focus. */
.hv-btn:focus-visible,
.hv-btn-primary:focus-visible,
.hv-btn-secondary:focus-visible {
	outline: 2px solid var(--hv-accent);
	outline-offset: 2px;
}

/* Skip-to-content target — visually hidden until focused (added to header.php in Phase 3). */
.hv-skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	z-index: 9999;
}
.hv-skip-link:focus {
	left: 1rem;
	top: 1rem;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: var(--hv-dark);
	color: #FFFFFF;
	border-radius: var(--hv-radius-sm);
}

/* Stratus header logo size band-aid — the transparent-top state has no
 * width constraint in this site's customizer mods, so the browser falls
 * back to full image dimensions (~1500px). Phase 3 replaces the header
 * entirely; this rule is throwaway. 170px matches the registered
 * `170x80` thumbnail size and the prod sticky-state rendering. */
.banner img.logo-main,
.banner img.logo-trans {
	max-width: 170px;
	height: auto;
}

/* Respect user's motion preference — disable Elementor & generic transitions. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
	.elementor-invisible,
	[data-settings*="_animation"] {
		visibility: visible !important;
		opacity: 1 !important;
	}
}
