/* ==========================================================================
   Design refresh (experiment, loaded after main.css)
   - soft blue-grey page background instead of white, content on rounded panels
   - quiet dot pattern and globe lines (from the logo) in the empty side areas
   - thin contact bar, page path (breadcrumbs), product page layout, reading progress
   Cards and steps (also shown in the editor) are in components.css.
   No dark sections, no sharp corners.
   ========================================================================== */

:root {
	--gs-canvas: #f1f5f9;
	--gs-panel-max: 1320px;
	--gs-panel-inset: clamp(0.5rem, 1.8vw, 1.5rem);
	--gs-panel-w: min(100% - 2 * var(--gs-panel-inset), var(--gs-panel-max));
	--gs-panel-gap: clamp(0.75rem, 1.6vw, 1.25rem);
	--gs-panel-radius: clamp(18px, 2vw, 26px);
	--gs-panel-border: #e1e9f3;
	--gs-panel-shadow: 0 1px 2px rgba(15, 36, 64, 0.04), 0 10px 30px rgba(15, 36, 64, 0.05);
	--gs-tint: linear-gradient(180deg, #f6f9fe 0%, #ecf3fb 100%);
	/* globe outline from the logo, drawn as thin lines */
	--gs-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%230569cd' stroke-width='0.6' stroke-opacity='0.22'%3E%3Ccircle cx='100' cy='100' r='96'/%3E%3Cellipse cx='100' cy='100' rx='38' ry='96'/%3E%3Cellipse cx='100' cy='100' rx='72' ry='96'/%3E%3Cpath d='M100 4v192M4 100h192M16.9 52h166.2M16.9 148h166.2M36.5 28h127M36.5 172h127'/%3E%3C/svg%3E");
	--gs-globe-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%230569cd' stroke-width='0.8' stroke-opacity='0.3'%3E%3Ccircle cx='100' cy='100' r='96'/%3E%3Cellipse cx='100' cy='100' rx='38' ry='96'/%3E%3Cellipse cx='100' cy='100' rx='72' ry='96'/%3E%3Cpath d='M100 4v192M4 100h192M16.9 52h166.2M16.9 148h166.2M36.5 28h127M36.5 172h127'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Page background and the side areas
   -------------------------------------------------------------------------- */

:root body {
	background: var(--gs-canvas);
}

/* On wide screens the space left and right of the content gets a quiet dot grid
   and two large globe outlines (fixed, behind the panels). */
@media (min-width: 1400px) {
	body::before,
	body::after {
		content: "";
		position: fixed;
		inset: 0;
		z-index: -1;
		pointer-events: none;
	}

	body::before {
		background-image: radial-gradient(circle, rgba(5, 105, 205, 0.16) 1px, transparent 1.5px);
		background-size: 22px 22px;
		-webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.25) calc(50% - 680px), transparent calc(50% - 640px), transparent calc(50% + 640px), rgba(0, 0, 0, 0.25) calc(50% + 680px), #000 100%);
		mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.25) calc(50% - 680px), transparent calc(50% - 640px), transparent calc(50% + 640px), rgba(0, 0, 0, 0.25) calc(50% + 680px), #000 100%);
	}

	body::after {
		background:
			var(--gs-globe) calc(50% - 920px) 14vh / 640px 640px no-repeat,
			var(--gs-globe) calc(50% + 920px) 62vh / 560px 560px no-repeat;
	}
}

/* --------------------------------------------------------------------------
   Panels: every band of the page sits on a rounded white card
   -------------------------------------------------------------------------- */

.gs-front > .alignfull,
.gs-page-hero,
main > .gs-page-content,
.gs-panel,
main > .gs-cta {
	width: var(--gs-panel-w);
	max-width: none;
	margin: var(--gs-panel-gap) auto 0 !important;
	border: 1px solid var(--gs-panel-border);
	border-radius: var(--gs-panel-radius);
	background-color: #fff;
	box-shadow: var(--gs-panel-shadow);
	overflow: clip; /* keeps the rounded corners; unlike "hidden", sticky parts inside still work */
}

/* light-tinted panels, so white and soft blue alternate down the page */
.gs-front > .gs-section--light {
	background: var(--gs-tint);
}

/* the blue contact band: its own rounded panel */
.gs-front > .gs-cta-block {
	border: 0;
	background: none;
}

main > .gs-cta {
	border: 0;
}

.gs-front > .gs-cta-block .gs-cta {
	border-radius: inherit;
}

/* a page that ends with the contact band: the band becomes the bottom of the content panel */
main > .gs-page-content:has(> .gs-cta-block:last-child) > .gs-cta-block:last-child {
	margin-bottom: 0 !important;
}

.gs-footer {
	margin-top: var(--gs-panel-gap);
}

/* --------------------------------------------------------------------------
   Top bar: what we do + phone and email (computers only)
   -------------------------------------------------------------------------- */

.gs-topbar {
	border-bottom: 1px solid #dbe6f3;
	background: #e9f1fa;
	color: #3d4b5d;
	font-size: 0.84rem;
}

.gs-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 38px;
}

.gs-topbar__note {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
	font-weight: 500;
}

.gs-topbar__note .gs-icon {
	width: 15px;
	height: 15px;
	color: var(--gs-brand);
}

.gs-topbar__contacts {
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gs-topbar__contacts a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--gs-navy);
	font-weight: 600;
	text-decoration: none;
}

.gs-topbar__contacts a:hover {
	color: var(--gs-brand);
}

.gs-topbar__contacts .gs-icon {
	width: 15px;
	height: 15px;
	color: var(--gs-brand);
}

@media (max-width: 960px) {
	.gs-topbar {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Title band of inner pages: tinted, globe lines on the right, page path
   -------------------------------------------------------------------------- */

.gs-page-hero {
	position: relative;
	border-bottom: 1px solid var(--gs-panel-border);
	background:
		radial-gradient(640px 300px at 88% 10%, rgba(5, 105, 205, 0.1), transparent 70%),
		linear-gradient(135deg, #f8fbff 0%, #eaf2fb 100%);
}

.gs-page-hero::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -70px;
	width: 380px;
	aspect-ratio: 1;
	background: var(--gs-globe-strong) center / contain no-repeat;
	translate: 0 -50%;
	pointer-events: none;
}

.gs-page-hero > .gs-container {
	position: relative;
	z-index: 1;
}

/* product pages: only a corner of the globe peeks out at the top right, behind the screenshot */
.gs-product-hero::after {
	top: -150px;
	right: -110px;
	width: 360px;
	translate: none;
}

.gs-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3rem;
	margin: 0 0 1.1rem;
	padding: 0;
	list-style: none;
	color: var(--gs-muted);
	font-size: 0.88rem;
}

.gs-crumbs li {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.gs-crumbs a {
	color: var(--gs-muted);
	font-weight: 500;
	text-decoration: none;
}

.gs-crumbs a:hover {
	color: var(--gs-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gs-crumbs .gs-icon {
	width: 14px;
	height: 14px;
	opacity: 0.55;
}

.gs-crumbs [aria-current="page"] {
	color: var(--gs-navy);
	font-weight: 600;
}

.gs-product-hero .gs-crumbs ol {
	margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   Product page: description | side card ("Накратко" + demo), reading progress
   -------------------------------------------------------------------------- */

.gs-product-body {
	padding-block: clamp(2rem, 4vw, 3.5rem);
}

.gs-product-body.has-aside {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: clamp(2rem, 3.5vw, 3.5rem);
	align-items: start;
}

.gs-product-body.has-aside.has-toc {
	grid-template-columns: 210px minmax(0, 1fr) 290px;
}

.gs-product-body .gs-product-content {
	padding-top: 0;
	padding-bottom: 0;
}

.gs-product-body .gs-toc {
	margin-top: 0;
}

.gs-product-aside {
	position: sticky;
	top: calc(var(--gs-header-h) + 1.5rem);
}

.admin-bar .gs-product-aside {
	top: calc(var(--gs-header-h) + 32px + 1.5rem);
}

/* reading progress (product pages) */
.gs-progress {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 200;
	height: 3px;
	pointer-events: none;
}

.admin-bar .gs-progress {
	top: 32px;
}

.gs-progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--gs-brand), #4aa3f0);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

@media (max-width: 1200px) {
	.gs-product-body.has-aside.has-toc {
		grid-template-columns: minmax(0, 1fr) 280px;
	}

	/* the "На тази страница" list becomes a row of chips above the text
	   (on phones, ≤ 900px, it is the compact bar from main.css instead) */
	.gs-product-body.has-toc .gs-toc {
		grid-column: 1 / -1;
	}

	.gs-product-body.has-toc .gs-toc:not(.is-compact) {
		position: static;
	}

	.gs-product-body.has-toc .gs-toc:not(.is-compact) ol {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
		border-left: 0;
	}

	.gs-product-body.has-toc .gs-toc:not(.is-compact) a {
		margin: 0;
		padding: 0.45rem 0.85rem;
		border: 1px solid var(--gs-line);
		border-radius: 999px;
		white-space: nowrap;
	}

	.gs-product-body.has-toc .gs-toc:not(.is-compact) a[aria-current="true"] {
		border-color: var(--gs-brand);
		background: var(--gs-light);
	}
}

@media (max-width: 900px) {
	.gs-product-body.has-aside,
	.gs-product-body.has-aside.has-toc {
		display: block;
	}

	.gs-product-aside {
		position: static;
		margin-top: 2.5rem;
	}
}

@media (max-width: 782px) {
	.admin-bar .gs-progress {
		top: 46px;
	}
}

/* --------------------------------------------------------------------------
   About page: text next to the "Накратко" company card
   -------------------------------------------------------------------------- */

.gs-about > .wp-block-columns {
	gap: clamp(2rem, 4vw, 3.5rem);
	margin: 0;
}

.gs-about .wp-block-column:last-child {
	position: sticky;
	top: calc(var(--gs-header-h) + 1.5rem);
	align-self: flex-start;
}

.admin-bar .gs-about .wp-block-column:last-child {
	top: calc(var(--gs-header-h) + 32px + 1.5rem);
}

.gs-about .wp-block-column > :first-child {
	margin-top: 0;
}

.gs-about .wp-block-column > h2 {
	margin-top: 2em;
	font-size: var(--wp--preset--font-size--x-large);
}

@media (max-width: 781px) {
	.gs-about .wp-block-column:last-child {
		position: static;
	}
}

/* --------------------------------------------------------------------------
   Visual cues (main.js adds the classes; nothing moves for "reduce motion")
   -------------------------------------------------------------------------- */

/* Idle spotlight: when the visitor pauses, product and capability cards take turns
   showing their hover look. Any mouse move, scroll, key or touch stops it at once. */
.gs-card.is-spotlight {
	border-color: #9fc4ec;
	box-shadow: 0 0 0 3px rgba(5, 105, 205, 0.1), var(--gs-shadow-lg);
	transform: translateY(-4px);
}

.gs-card.is-spotlight .gs-window {
	transform: translateY(-6px);
}

.gs-card.is-spotlight .gs-window img {
	transform: scale(1.03);
}

.gs-card.is-spotlight .gs-card__more .gs-icon {
	transform: translateX(4px);
}

.gs-cap.is-spotlight {
	border-color: #9fc4ec;
	box-shadow: 0 0 0 3px rgba(5, 105, 205, 0.1), var(--gs-shadow-lg);
	transform: translateY(-3px);
}

.gs-cap.is-spotlight::before {
	background: var(--gs-brand);
}

.gs-cap.is-spotlight::after {
	background: #fff;
}

/* "Защо Глобал Софтуер" cards and contact cards: lift + their number / icon tile turns blue */
.gs-features > .wp-block-column.is-spotlight,
.gs-contact-card.is-spotlight {
	border-color: #9fc4ec;
	box-shadow: 0 0 0 3px rgba(5, 105, 205, 0.1), var(--gs-shadow-lg);
	transform: translateY(-3px);
}

.gs-features > .wp-block-column::before,
.gs-contact-card__icon {
	transition: background-color 350ms var(--gs-ease-out), color 350ms var(--gs-ease-out);
}

.gs-features > .wp-block-column.is-spotlight::before,
.gs-contact-card.is-spotlight .gs-contact-card__icon {
	background: var(--gs-brand);
	color: #fff;
}

/* the hover look fades in and out a little slower when it moves by itself */
.gs-card,
.gs-card .gs-window,
.gs-card .gs-window img,
.gs-cap,
.gs-features > .wp-block-column,
.gs-contact-card {
	transition-duration: 350ms;
}

/* „НОВО!“: a soft light sweeps across the label every few seconds */
@media (prefers-reduced-motion: no-preference) {
	.gs-badge {
		position: relative;
		overflow: hidden;
		isolation: isolate;
		animation: gs-badge-glow 5s ease-in-out 1.2s infinite;
	}

	.gs-badge::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.9) 50%, transparent 75%);
		transform: translateX(-130%);
		animation: gs-badge-shine 5s ease-in-out 1.2s infinite;
	}
}

@keyframes gs-badge-shine {
	0%,
	55% { transform: translateX(-130%); }
	80%,
	100% { transform: translateX(130%); }
}

@keyframes gs-badge-glow {
	0%,
	50%,
	100% { box-shadow: 0 0 0 0 rgba(242, 140, 40, 0); }
	68% { box-shadow: 0 0 0 4px rgba(242, 140, 40, 0.18), 0 0 14px rgba(242, 140, 40, 0.35); }
}

/* "Как работим": when the steps first come into view, a ring draws around each circle
   like a loading bar (longer steps load slower), a "% done" tag pops up, and the line
   fills to the next step. The finished state stays; a page refresh plays it again. */
.gs-steps.is-animated > .wp-block-column {
	z-index: 1;
}

.gs-steps.is-animated > .wp-block-column::before {
	border: 3px solid transparent;
	background:
		linear-gradient(#fff, #fff) padding-box,
		conic-gradient(var(--gs-brand) calc(var(--gs-ring, 0) * 1turn), #d9e6f4 0) border-box;
}

.gs-steps.is-animated > .wp-block-column:hover::before {
	background:
		linear-gradient(var(--gs-brand), var(--gs-brand)) padding-box,
		conic-gradient(var(--gs-brand) calc(var(--gs-ring, 0) * 1turn), #d9e6f4 0) border-box;
}

/* blue line growing over the dotted one */
.gs-steps.is-animated::after {
	content: "";
	position: absolute;
	top: 1.75rem;
	left: calc((100% - (var(--gs-n) - 1) * var(--gs-step-gap)) / (2 * var(--gs-n)));
	z-index: 0;
	width: calc((100% - (100% - (var(--gs-n) - 1) * var(--gs-step-gap)) / var(--gs-n)) * var(--gs-line, 0));
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--gs-brand), #4aa3f0);
	pointer-events: none;
}

.gs-steps:has(> .wp-block-column:nth-child(7))::after {
	display: none;
}

/* "% done" tag at the top right of each circle */
.gs-step-pct {
	position: absolute;
	top: -0.55rem;
	left: calc(50% + 1.15rem);
	z-index: 2;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: var(--gs-brand);
	box-shadow: 0 0 0 3px #fff;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.5;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 250ms var(--gs-ease-out), transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
}

.is-done > .gs-step-pct {
	opacity: 1;
	transform: none;
}

.gs-step-pct.is-complete {
	background: #15803d; /* dark enough for small white text (contrast 5:1) */
}

@media (max-width: 960px) {
	.gs-steps.is-animated::after {
		display: none;
	}
}

/* phones (icon on the left of the text): the tag sits on the bottom edge of the circle */
@media (max-width: 600px) {
	.gs-step-pct {
		top: 2.85rem;
		left: 1.75rem;
		translate: -50% 0;
	}
}

/* --------------------------------------------------------------------------
   Printing: plain white pages
   -------------------------------------------------------------------------- */

@media print {
	:root body {
		background: #fff;
	}

	body::before,
	body::after,
	.gs-topbar,
	.gs-progress,
	.gs-product-aside {
		display: none !important;
	}

	.gs-front > .alignfull,
	.gs-page-hero,
	main > .gs-page-content,
	.gs-panel,
	main > .gs-cta {
		width: auto;
		border: 0;
		box-shadow: none;
	}
}
