/**
 * HTA design tokens and shared primitives.
 *
 * Loaded before every other HTA stylesheet. Values are taken from
 * references/homepage-design.pdf (colours sampled from the rendered design).
 */

:root {
	/* Brand ------------------------------------------------------------- */
	--hta-orange: #ff7020;
	--hta-orange-dark: #e05c12;
	--hta-green: #72ac2a;
	--hta-graphite: #444444;
	--hta-graphite-dark: #333333;

	/* Dark surfaces: partners strip and footer in the design. */
	--hta-dark: #2f2f2f;
	--hta-dark-deep: #252524;

	--hta-white: #ffffff;
	--hta-ink: #444444;
	--hta-heading: #1a1a1a;
	--hta-body: #3d3d3d;
	--hta-muted: #6f6f6f;

	/* Light surfaces */
	--hta-surface: #f2f2f2;
	--hta-surface-alt: #e9e9e9;
	--hta-map: #f3f3f3;
	--hta-border: #e0e0e0;

	/* Layout ------------------------------------------------------------ */
	--hta-container: 1240px;
	--hta-gutter: 20px;
	--hta-section-y: clamp(48px, 5.5vw, 96px);

	--hta-radius: 12px;
	--hta-radius-lg: 24px;
	--hta-radius-pill: 999px;

	/*
	 * Typography --------------------------------------------------------
	 * The design uses a bracketed serif for headings and a rounded
	 * geometric sans for body copy. Both are replaced here by system stacks
	 * with full Cyrillic coverage; swap these two tokens once licensed
	 * webfonts are available and the whole site follows.
	 */
	--hta-font-heading: Georgia, "PT Serif", "Times New Roman", serif;
	--hta-font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--hta-transition: 0.25s ease;
}

@media (max-width: 480px) {

	:root {
		--hta-gutter: 16px;
	}
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.hta-container {
	width: 100%;
	max-width: var(--hta-container);
	margin: 0 auto;
	padding: 0 var(--hta-gutter);
}

.hta-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.hta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid transparent;
	border-radius: var(--hta-radius-pill);
	font-family: var(--hta-font-body);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--hta-transition), border-color var(--hta-transition), color var(--hta-transition);
}

.hta-btn:focus-visible {
	outline: 2px solid var(--hta-heading);
	outline-offset: 3px;
}

.hta-btn--primary {
	background: var(--hta-orange);
	border-color: var(--hta-orange);
	color: var(--hta-white);
}

.hta-btn--primary:hover,
.hta-btn--primary:focus-visible {
	background: var(--hta-orange-dark);
	border-color: var(--hta-orange-dark);
	color: var(--hta-white);
}

.hta-btn--ghost {
	background: transparent;
	border-color: var(--hta-orange);
	color: var(--hta-orange);
}

.hta-btn--ghost:hover,
.hta-btn--ghost:focus-visible {
	background: var(--hta-orange);
	color: var(--hta-white);
}

.hta-btn--small {
	min-height: 40px;
	padding: 9px 24px;
	font-size: 15px;
}

/* --------------------------------------------------------------------------
   Media blocks and image placeholders
   -------------------------------------------------------------------------- */

.hta-media {
	position: relative;
	overflow: hidden;
	background: var(--hta-surface);
}

.hta-media--16x9 {
	aspect-ratio: 16 / 9;
}

.hta-media--2x1 {
	aspect-ratio: 2 / 1;
}

.hta-media--16x10 {
	aspect-ratio: 16 / 10;
}

.hta-media--4x3 {
	aspect-ratio: 4 / 3;
}

.hta-media--1x1 {
	aspect-ratio: 1 / 1;
}

.hta-media > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Placeholder shown when the real asset is not in the repository yet. It
 * keeps the exact box the final image will occupy and says so out loud.
 */
.hta-media__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	height: 100%;
	padding: 16px;
	background-color: var(--hta-surface);
	background-image: repeating-linear-gradient(
		135deg,
		rgba(0, 0, 0, 0.045) 0,
		rgba(0, 0, 0, 0.045) 10px,
		transparent 10px,
		transparent 20px
	);
	color: var(--hta-muted);
	text-align: center;
}

.hta-media__label {
	font-family: var(--hta-font-body);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.hta-media__note {
	font-family: var(--hta-font-body);
	font-size: 13px;
	opacity: 0.8;
}

.hta-media--on-dark .hta-media__placeholder {
	background-color: rgba(255, 255, 255, 0.06);
	background-image: repeating-linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.08) 0,
		rgba(255, 255, 255, 0.08) 10px,
		transparent 10px,
		transparent 20px
	);
	color: rgba(255, 255, 255, 0.72);
}
