/* =========================================================================
   Hosting Guide — main.css
   Токены: сине-фиолетовая гамма (Cloud4Y / Selectel)
   ========================================================================= */

:root {
	/* Accent */
	--hg-accent: #203a97;
	--hg-accent-light: #3b5bdb;
	--hg-accent-violet: #8610d4;
	--hg-accent-soft: rgba(32, 58, 151, 0.08);
	--hg-accent-ring: rgba(32, 58, 151, 0.18);
	--hg-gradient-cta: linear-gradient(135deg, #203a97 0%, #8610d4 100%);

	/* Text */
	--hg-text: #111827;
	--hg-text-soft: #374151;
	--hg-text-muted: #6b7280;
	--hg-text-faint: #9ca3af;

	/* Surface */
	--hg-bg: #ffffff;
	--hg-bg-soft: #f8fafc;
	--hg-bg-strong: #eef2ff;

	/* Borders */
	--hg-line: #e5e7eb;
	--hg-line-strong: #d1d5db;

	/* Radii */
	--hg-radius-sm: 6px;
	--hg-radius-md: 12px;
	--hg-radius-lg: 20px;

	/* Layout */
	--hg-container: 1200px;
	--hg-gap: 1.5rem;

	/* Fonts */
	--hg-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--hg-font-heading: "Montserrat", "Inter", system-ui, sans-serif;
	--hg-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--hg-bg);
	color: var(--hg-text);
	font-family: var(--hg-font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a {
	color: var(--hg-accent);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
	color: var(--hg-accent-violet);
}

h1, h2, h3, h4 {
	margin: 0;
	font-family: var(--hg-font-heading);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--hg-text);
}

h1 {
	font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
	font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
	font-size: clamp(1.125rem, 2vw, 1.375rem);
}

p {
	margin: 0 0 1rem;
}

.hg-container {
	width: min(calc(100% - 2rem), var(--hg-container));
	margin-inline: auto;
}

.hg-main {
	min-height: 60vh;
}

.hg-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--hg-accent);
	color: #fff;
	padding: 0.75rem 1rem;
	z-index: 9999;
	border-radius: 0 0 var(--hg-radius-sm) 0;
}

.hg-skip-link:focus {
	left: 0;
	color: #fff;
}

/* =========================================================================
   Header
   ========================================================================= */

.hg-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--hg-line);
	backdrop-filter: saturate(1.2) blur(8px);
}

.hg-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 0.85rem;
}

.hg-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	color: var(--hg-text);
	font-family: var(--hg-font-heading);
	font-weight: 800;
	font-size: 1.125rem;
	flex-shrink: 0;
}

.hg-logo:hover,
.hg-logo:focus-visible {
	color: var(--hg-accent);
}

.hg-logo__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	background: var(--hg-gradient-cta);
	color: #fff;
	border-radius: 8px;
	font-size: 0.875rem;
	letter-spacing: 0.02em;
}

.hg-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 4px;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--hg-line);
	background: #fff;
	border-radius: 8px;
	cursor: pointer;
}

.hg-menu-toggle span {
	display: block;
	width: 1.125rem;
	height: 2px;
	background: var(--hg-text);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.hg-menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.hg-menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.hg-menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

.hg-nav__list {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hg-nav__list a {
	display: inline-block;
	padding: 0.5rem 0.9rem;
	border-radius: 8px;
	color: var(--hg-text-soft);
	font-weight: 500;
	font-size: 0.95rem;
}

.hg-nav__list a:hover,
.hg-nav__list a:focus-visible {
	color: var(--hg-accent);
	background: var(--hg-accent-soft);
}

.hg-nav__list .current-menu-item > a,
.hg-nav__list .current_page_item > a {
	color: var(--hg-accent);
	background: var(--hg-accent-soft);
}

.hg-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 14rem;
	background: #fff;
	border: 1px solid var(--hg-line);
	border-radius: var(--hg-radius-md);
	box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
	list-style: none;
	padding: 0.5rem;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 10;
}

.hg-nav__list .menu-item-has-children {
	position: relative;
}

.hg-nav__list .menu-item-has-children:hover > .sub-menu,
.hg-nav__list .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

@media (max-width: 900px) {
	.hg-menu-toggle {
		display: inline-flex;
	}

	.hg-nav {
		position: absolute;
		top: calc(100% + 1px);
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 1px solid var(--hg-line);
		box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	}

	.hg-nav[data-open="true"] {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
	}

	.hg-nav__list {
		flex-direction: column;
		align-items: stretch;
		padding: 0.75rem 1rem;
	}

	.hg-nav__list a {
		display: block;
		padding: 0.75rem 0.9rem;
	}
}

/* =========================================================================
   Footer
   ========================================================================= */

.hg-footer {
	background: var(--hg-bg-soft);
	border-top: 1px solid var(--hg-line);
	margin-top: 4rem;
	padding-block: 3rem 1.5rem;
}

.hg-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
	gap: 2rem;
}

.hg-footer__lead {
	color: var(--hg-text-muted);
	font-size: 0.95rem;
	margin-top: 0.9rem;
	max-width: 32rem;
}

.hg-footer__title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--hg-text-muted);
	margin-bottom: 0.9rem;
}

.hg-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

.hg-footer__list a {
	color: var(--hg-text-soft);
	font-size: 0.95rem;
}

.hg-footer__list a:hover,
.hg-footer__list a:focus-visible {
	color: var(--hg-accent);
}

.hg-footer__bottom {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--hg-line);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.75rem;
	color: var(--hg-text-muted);
	font-size: 0.85rem;
}

.hg-footer__bottom p {
	margin: 0;
}

@media (max-width: 900px) {
	.hg-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 600px) {
	.hg-footer__grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================================
   Buttons
   ========================================================================= */

.hg-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.8rem 1.4rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
	text-align: center;
}

.hg-button--primary {
	background: var(--hg-gradient-cta);
	color: #fff;
	box-shadow: 0 8px 24px rgba(32, 58, 151, 0.2);
}

.hg-button--primary:hover,
.hg-button--primary:focus-visible {
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(32, 58, 151, 0.28);
}

.hg-button--ghost {
	background: #fff;
	color: var(--hg-accent);
	border-color: var(--hg-accent);
}

.hg-button--ghost:hover,
.hg-button--ghost:focus-visible {
	background: var(--hg-accent-soft);
	color: var(--hg-accent);
}

/* =========================================================================
   Sections / typography helpers
   ========================================================================= */

.hg-section {
	padding-block: 4rem;
}

.hg-section--soft {
	background: var(--hg-bg-soft);
}

.hg-section__header {
	margin-bottom: 2rem;
	max-width: 44rem;
}

.hg-section__title {
	margin-top: 0.5rem;
}

.hg-eyebrow {
	display: inline-block;
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hg-accent);
}

/* =========================================================================
   Cards
   ========================================================================= */

.hg-cards-grid {
	display: grid;
	gap: var(--hg-gap);
}

.hg-cards-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
	.hg-cards-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.hg-cards-grid--3 {
		grid-template-columns: 1fr;
	}
}

.hg-card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--hg-line);
	border-radius: var(--hg-radius-md);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.hg-card:hover,
.hg-card:focus-within {
	border-color: var(--hg-accent);
	box-shadow: 0 10px 24px rgba(32, 58, 151, 0.08);
	transform: translateY(-2px);
}

.hg-card__media {
	display: block;
	margin: -1.5rem -1.5rem 0;
	overflow: hidden;
	border-radius: var(--hg-radius-md) var(--hg-radius-md) 0 0;
	aspect-ratio: 16 / 9;
	background: var(--hg-bg-soft);
}

.hg-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hg-card__title {
	font-size: 1.125rem;
	line-height: 1.3;
}

.hg-card__title a {
	color: var(--hg-text);
}

.hg-card__title a:hover,
.hg-card__title a:focus-visible {
	color: var(--hg-accent);
}

.hg-card__desc {
	margin: 0;
	color: var(--hg-text-muted);
	font-size: 0.95rem;
	flex: 1;
}

.hg-card__cta {
	display: inline-block;
	margin-top: 0.25rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--hg-accent);
}

.hg-card__cta::after {
	content: " →";
}

/* =========================================================================
   Hero
   ========================================================================= */

.hg-hero {
	padding-block: 5rem 4rem;
	background:
		radial-gradient(900px 400px at 10% -10%, rgba(32, 58, 151, 0.08), transparent 60%),
		radial-gradient(700px 400px at 95% 0%, rgba(134, 16, 212, 0.06), transparent 60%),
		var(--hg-bg);
	border-bottom: 1px solid var(--hg-line);
}

.hg-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 3rem;
	align-items: center;
}

.hg-hero__title {
	font-size: clamp(2.25rem, 4.5vw, 3.5rem);
	margin-top: 0.75rem;
}

.hg-hero__title span {
	display: block;
	background: var(--hg-gradient-cta);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hg-hero__lead {
	margin-top: 1rem;
	max-width: 36rem;
	font-size: 1.05rem;
	color: var(--hg-text-soft);
}

.hg-hero__actions {
	margin-top: 1.75rem;
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.hg-hero__visual {
	display: flex;
	justify-content: flex-end;
}

.hg-hero__card {
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--hg-line);
	border-radius: var(--hg-radius-lg);
	box-shadow: 0 20px 60px rgba(17, 24, 39, 0.08);
	min-width: 260px;
}

.hg-hero__card-label {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hg-text-muted);
}

.hg-hero__card-value {
	margin: 0.25rem 0 1rem;
	font-family: var(--hg-font-mono);
	font-size: 1rem;
	font-weight: 600;
	color: var(--hg-text);
}

.hg-hero__card-value:last-child {
	margin-bottom: 0;
}

@media (max-width: 900px) {
	.hg-hero__inner {
		grid-template-columns: 1fr;
	}

	.hg-hero__visual {
		justify-content: flex-start;
	}
}

/* =========================================================================
   Providers grid (home)
   ========================================================================= */

.hg-providers-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.hg-provider-chip {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid var(--hg-line);
	border-radius: var(--hg-radius-md);
	color: var(--hg-text);
	transition: border-color 0.2s ease, transform 0.15s ease;
}

.hg-provider-chip:hover,
.hg-provider-chip:focus-visible {
	border-color: var(--hg-accent);
	color: var(--hg-text);
	transform: translateY(-1px);
}

.hg-provider-chip__name {
	font-weight: 600;
}

.hg-provider-chip__count {
	font-size: 0.8rem;
	color: var(--hg-text-muted);
}

@media (max-width: 900px) {
	.hg-providers-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.hg-providers-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================================
   Utility
   ========================================================================= */

.hg-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

:focus-visible {
	outline: 2px solid var(--hg-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
