/**
 * Toopix — векторско лого и знак на фирмата: бои, анимации, воден жиг,
 * прелоадер и транзиција со логото.
 */

.tx-bm {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

/* --------------------------------------------------------------------------
   Бои
   ------------------------------------------------------------------------ */
.tx-bm--c-invert .bm-t,
.tx-bm--c-invert .bm-t tspan,
.tx-dark .tx-logo .tx-bm .bm-t,
.tx-dark .tx-logo .tx-bm .bm-t tspan {
	fill: #ffffff;
	stroke: #ffffff;
}

.tx-bm--c-white .bm-a,
.tx-bm--c-white .bm-b,
.tx-bm--c-white .bm-c,
.tx-bm--c-white .bm-t,
.tx-bm--c-white .bm-t tspan,
.tx-bm--c-white .bm-leaf,
.tx-bm--c-white .bm-dots {
	fill: #ffffff;
	stroke: #ffffff;
}

.tx-bm--c-white .bm-s,
.tx-bm--c-white .bm-ring {
	stroke: #ffffff;
}

.tx-bm--c-accent .bm-a,
.tx-bm--c-accent .bm-b,
.tx-bm--c-accent .bm-t,
.tx-bm--c-accent .bm-t tspan,
.tx-bm--c-accent .bm-leaf {
	fill: var(--tx-accent);
	stroke: var(--tx-accent);
}

.tx-bm--c-accent .bm-s,
.tx-bm--c-accent .bm-ring {
	stroke: var(--tx-accent);
}

.tx-bm--c-dark .bm-a,
.tx-bm--c-dark .bm-b,
.tx-bm--c-dark .bm-t,
.tx-bm--c-dark .bm-t tspan,
.tx-bm--c-dark .bm-leaf {
	fill: var(--tx-ink, #111);
	stroke: var(--tx-ink, #111);
}

.tx-bm--c-dark .bm-s,
.tx-bm--c-dark .bm-ring {
	stroke: var(--tx-ink, #111);
}

/* Контура (воден жиг): само тенки линии во тековната боја */
.tx-bm--c-outline * {
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 1.15px !important;
	vector-effect: non-scaling-stroke;
}

.tx-bm--c-outline .bm-scan,
.tx-bm--c-outline .bm-dots,
.tx-bm--c-outline .bm-rays,
.tx-bm--c-outline stop {
	display: none;
}

.tx-bm--c-outline rect[fill^="url"],
.tx-bm--c-outline g[clip-path] > rect {
	display: none;
}

/* --------------------------------------------------------------------------
   Цртање: контурата се исцртува, па се полни бојата
   ------------------------------------------------------------------------ */
.tx-bm-anim[data-anim="draw"] .bm-p,
.tx-bm-anim[data-anim="grow"] .bm-p {
	stroke-width: 1.4px;
	vector-effect: non-scaling-stroke;
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	fill-opacity: 0;
}

.tx-bm-anim[data-anim="draw"] .bm-s,
.tx-bm-anim[data-anim="grow"] .bm-s {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
}

.tx-bm-anim[data-anim="draw"] .bm-t,
.tx-bm-anim[data-anim="draw"] .bm-c,
.tx-bm-anim[data-anim="draw"] .bm-dots,
.tx-bm-anim[data-anim="draw"] .bm-ring,
.tx-bm-anim[data-anim="draw"] .bm-w,
.tx-bm-anim[data-anim="grow"] .bm-t:not(.bm-p),
.tx-bm-anim[data-anim="grow"] .bm-c,
.tx-bm-anim[data-anim="grow"] .bm-dots {
	opacity: 0;
}

.tx-bm-anim[data-anim="draw"] .bm-leaf,
.tx-bm-anim[data-anim="grow"] .bm-leaf {
	transform: scale(0);
	transform-box: fill-box;
	transform-origin: center;
}

.tx-bm-anim[data-anim="draw"].is-in .bm-p,
.tx-bm-anim[data-anim="grow"].is-in .bm-p {
	animation:
		bm-dash 1.5s cubic-bezier(0.65, 0, 0.35, 1) forwards,
		bm-fill 0.9s ease forwards;
	animation-delay: calc(var(--i, 0) * 0.16s), calc(var(--i, 0) * 0.16s + 1s);
}

.tx-bm-anim[data-anim="draw"].is-in .bm-s,
.tx-bm-anim[data-anim="grow"].is-in .bm-s {
	animation: bm-dash 1.25s cubic-bezier(0.65, 0, 0.35, 1) forwards;
	animation-delay: calc(var(--i, 0) * 0.15s);
}

.tx-bm-anim[data-anim="draw"].is-in .bm-t,
.tx-bm-anim[data-anim="draw"].is-in .bm-c,
.tx-bm-anim[data-anim="draw"].is-in .bm-dots,
.tx-bm-anim[data-anim="draw"].is-in .bm-ring,
.tx-bm-anim[data-anim="draw"].is-in .bm-w,
.tx-bm-anim[data-anim="grow"].is-in .bm-t:not(.bm-p),
.tx-bm-anim[data-anim="grow"].is-in .bm-c,
.tx-bm-anim[data-anim="grow"].is-in .bm-dots {
	animation: bm-fade 0.9s ease 1.1s forwards;
}

.tx-bm-anim[data-anim="draw"].is-in .bm-ring {
	animation-delay: calc(0.2s + var(--i, 0) * 0.15s);
}

.tx-bm-anim[data-anim="draw"].is-in .bm-leaf,
.tx-bm-anim[data-anim="grow"].is-in .bm-leaf {
	animation: bm-pop 0.55s cubic-bezier(0.3, 1.5, 0.55, 1) forwards;
	animation-delay: calc(0.9s + var(--i, 0) * 0.045s);
}

@keyframes bm-dash { to { stroke-dashoffset: 0; } }
@keyframes bm-fill { to { fill-opacity: 1; } }
@keyframes bm-fade { to { opacity: 1; } }
@keyframes bm-pop { to { transform: scale(1); } }

/* --------------------------------------------------------------------------
   Склопување: деловите доаѓаат на место
   ------------------------------------------------------------------------ */
.tx-bm-anim[data-anim="assemble"] .bm-p,
.tx-bm-anim[data-anim="assemble"] .bm-s,
.tx-bm-anim[data-anim="assemble"] .bm-ring,
.tx-bm-anim[data-anim="assemble"] .bm-t,
.tx-bm-anim[data-anim="assemble"] .bm-leaf,
.tx-bm-anim[data-anim="assemble"] .bm-w > * {
	opacity: 0;
	transform: translate(calc((var(--i, 0) - 1.5) * 14px), 26px);
	transform-box: fill-box;
	transform-origin: center;
}

.tx-bm-anim[data-anim="assemble"].is-in .bm-p,
.tx-bm-anim[data-anim="assemble"].is-in .bm-s,
.tx-bm-anim[data-anim="assemble"].is-in .bm-ring,
.tx-bm-anim[data-anim="assemble"].is-in .bm-t,
.tx-bm-anim[data-anim="assemble"].is-in .bm-leaf,
.tx-bm-anim[data-anim="assemble"].is-in .bm-w > * {
	animation: bm-assemble 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
	animation-delay: calc(var(--i, 0) * 0.09s);
}

@keyframes bm-assemble { to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Бранови (ICS: проток на воздух, Radio: звучни бранови)
   ------------------------------------------------------------------------ */
.tx-bm-anim[data-anim="pulse"].is-in .bm-s,
.tx-bm-anim[data-anim="pulse"].is-in .bm-ring {
	animation: bm-wave 3.2s ease-in-out infinite;
	animation-delay: calc(var(--i, 0) * 0.32s);
}

.tx-bm-anim[data-anim="pulse"].is-in .bm-s[pathLength] {
	stroke-dasharray: 1;
	animation:
		bm-dash-in 1.2s cubic-bezier(0.65, 0, 0.35, 1) both,
		bm-wave 3.2s ease-in-out 1.4s infinite;
	animation-delay: calc(var(--i, 0) * 0.15s), calc(1.4s + var(--i, 0) * 0.32s);
}

@keyframes bm-dash-in { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@keyframes bm-wave {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.32; }
}

/* --------------------------------------------------------------------------
   Скенирање (Мегамед): линија поминува низ рендгенот
   ------------------------------------------------------------------------ */
.tx-bm .bm-scan {
	opacity: 0;
}

.tx-bm-anim[data-anim="scan"].is-in .bm-scan,
.tx-bm-anim[data-anim="draw"].is-in .bm-scan {
	animation: bm-scan 3.4s cubic-bezier(0.6, 0, 0.4, 1) 1.6s infinite;
}

.tx-bm-anim[data-anim="scan"].is-in .bm-rays .bm-s {
	animation: bm-wave 3.4s ease-in-out infinite;
	animation-delay: calc(var(--i, 0) * 0.2s);
}

@keyframes bm-scan {
	0% { opacity: 0; transform: translateY(0); }
	10% { opacity: 0.75; }
	70% { opacity: 0.75; transform: translateY(68px); }
	80%, 100% { opacity: 0; transform: translateY(68px); }
}

/* --------------------------------------------------------------------------
   Лебдење
   ------------------------------------------------------------------------ */
.tx-bm-anim[data-anim="float"].is-in {
	animation: bm-float 6s ease-in-out infinite;
}

@keyframes bm-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

/* --------------------------------------------------------------------------
   Елемент „Лого анимација“
   ------------------------------------------------------------------------ */
.tpb-bm {
	position: relative;
	display: flex;
	justify-content: var(--tpb-bm-align, center);
}

.tpb-bm__stage {
	position: relative;
	width: min(100%, var(--tpb-bm-size, 220px));
}

.tpb-bm__stage > .tx-bm {
	position: relative;
	z-index: 1;
}

.tpb-bm__orbit {
	position: absolute;
	inset: -22%;
	pointer-events: none;
}

.tpb-bm__orbit i {
	position: absolute;
	inset: 0;
	border: 1px dashed color-mix(in srgb, var(--tpb-bm-ring, var(--tx-accent)) 45%, transparent);
	border-radius: 50%;
	animation: bm-orbit 38s linear infinite;
}

.tpb-bm__orbit i:nth-child(2) {
	inset: 12%;
	border-style: solid;
	border-color: color-mix(in srgb, var(--tpb-bm-ring, var(--tx-accent)) 22%, transparent);
	animation-duration: 26s;
	animation-direction: reverse;
}

.tpb-bm__orbit i::before {
	content: "";
	position: absolute;
	top: -4px;
	left: 50%;
	width: 8px;
	height: 8px;
	margin-left: -4px;
	border-radius: 50%;
	background: var(--tpb-bm-ring, var(--tx-accent));
	box-shadow: 0 0 14px var(--tpb-bm-ring, var(--tx-accent));
}

.tpb-bm__orbit i:nth-child(2)::before {
	top: auto;
	bottom: -3px;
	width: 6px;
	height: 6px;
	opacity: 0.7;
}

@keyframes bm-orbit { to { transform: rotate(360deg); } }

.tpb-bm--glow .tpb-bm__stage::before {
	content: "";
	position: absolute;
	inset: -10%;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--tpb-bm-ring, var(--tx-accent)) 30%, transparent), transparent 65%);
	filter: blur(10px);
	animation: bm-glow 5s ease-in-out infinite;
}

@keyframes bm-glow {
	0%, 100% { opacity: 0.55; transform: scale(0.94); }
	50% { opacity: 1; transform: scale(1.04); }
}

.tpb-bm__caption {
	margin: 1rem 0 0;
	text-align: center;
	font-size: 0.82rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.7;
}

/* Разделник: линија — знак — линија */
.tpb-bm--divider .tpb-bm__stage {
	width: var(--tpb-bm-size, 56px);
	flex: none;
}

.tpb-bm--divider {
	align-items: center;
	gap: 18px;
}

.tpb-bm--divider::before,
.tpb-bm--divider::after {
	content: "";
	flex: 1;
	max-width: 240px;
	height: 1px;
	background: linear-gradient(90deg, transparent, color-mix(in srgb, currentColor 30%, transparent));
}

.tpb-bm--divider::after {
	background: linear-gradient(90deg, color-mix(in srgb, currentColor 30%, transparent), transparent);
}

/* --------------------------------------------------------------------------
   Воден жиг во секциите, заглавијата и подножјето
   ------------------------------------------------------------------------ */
.tpb-wm {
	position: absolute;
	top: 50%;
	z-index: 0;
	width: var(--tpb-wm-size, 46%);
	max-width: 760px;
	color: var(--tpb-wm-color, var(--tx-accent));
	opacity: var(--tpb-wm-opacity, 0.1);
	pointer-events: none;
	transform: translateY(-50%);
}

.tpb-wm--right { right: -4%; }
.tpb-wm--left { left: -4%; }
.tpb-wm--center { left: 50%; transform: translate(-50%, -50%); }

.tpb-wm > div {
	will-change: transform;
}

.tpb-section > .tpb-wm ~ .tpb-container {
	position: relative;
	z-index: 1;
}

.tpb-wm--pattern {
	inset: 0;
	top: 0;
	width: auto;
	max-width: none;
	transform: none;
	background-image: var(--tpb-wm-pattern);
	background-size: var(--tpb-wm-tile, 120px);
	-webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.tx-ph-mark {
	position: absolute;
	top: 50%;
	right: 4%;
	width: clamp(180px, 26vw, 400px);
	margin-top: calc(clamp(180px, 26vw, 400px) * -0.5);
	color: currentColor;
	opacity: 0.16;
	pointer-events: none;
}

.tx-footer {
	position: relative;
}

.tx-footer-mark {
	position: absolute;
	right: -3%;
	bottom: -6%;
	z-index: 0;
	width: clamp(260px, 34vw, 560px);
	color: currentColor;
	opacity: 0.07;
	pointer-events: none;
}

.tx-footer > *:not(.tx-footer-mark):not(.tx-footer-art) {
	position: relative;
	z-index: 1;
}

/* Производ без слика */
.tx-wc-ph {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	padding: 22%;
	background:
		radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--tx-accent) 10%, transparent), transparent 60%),
		color-mix(in srgb, var(--tx-accent) 5%, var(--tx-paper, #fff));
	color: color-mix(in srgb, var(--tx-accent) 55%, transparent);
}

.tx-wc-ph .tx-bm {
	max-width: 160px;
}

/* --------------------------------------------------------------------------
   Прелоадер со логото
   ------------------------------------------------------------------------ */
.tx-preloader--brand {
	background: var(--tx-pre-bg, var(--tx-paper, #fff));
	color: var(--tx-ink, #111);
}

.tx-pre-brand {
	width: clamp(110px, 16vw, 170px);
	margin: 0 auto;
}

.tx-pre-brand__name {
	margin: 1.4rem 0 0;
	font-family: var(--tx-font-display);
	font-size: 0.78rem;
	letter-spacing: 0.32em;
	text-align: center;
	text-transform: uppercase;
	opacity: 0;
	animation: bm-fade 0.8s ease 1s forwards;
}

.tx-pre-brand__line {
	position: relative;
	display: block;
	width: 140px;
	height: 2px;
	margin: 1.1rem auto 0;
	overflow: hidden;
	background: color-mix(in srgb, currentColor 12%, transparent);
}

.tx-pre-brand__line i {
	position: absolute;
	inset: 0;
	background: var(--tx-accent);
	transform: scaleX(var(--tx-progress, 0));
	transform-origin: left;
	transition: transform 0.2s linear;
}

.tx-transition--brand .tx-transition__panel {
	background: var(--tx-dark, var(--tx-ink));
}

.tx-transition--brand .tx-transition__panel::before {
	display: none;
}

.tx-transition__art--brand {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: clamp(70px, 9vw, 110px);
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.88);
	transition: opacity 0.35s ease, transform 0.6s var(--tx-ease-io, ease);
}

.tx-leaving .tx-transition__art--brand,
.tx-entering .tx-transition__art--brand {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
	transition-delay: 0.25s;
}

.tx-entered .tx-transition__art--brand {
	opacity: 0;
	transition-delay: 0s;
	transition-duration: 0.25s;
}

.tx-bm-anim.is-paused,
.tx-bm-anim.is-paused * {
	animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
	.tx-bm-anim *,
	.tx-bm-anim,
	.tpb-bm__orbit i,
	.tpb-bm--glow .tpb-bm__stage::before {
		animation: none !important;
		opacity: 1 !important;
		stroke-dashoffset: 0 !important;
		fill-opacity: 1 !important;
	}
	/* Original SVG transforms place the artwork; only reset animated transforms. */
	.tx-bm-anim,
	.tx-bm-anim :not(.bm-faithful *) {
		transform: none !important;
	}
}

/* --------------------------------------------------------------------------
   Заглавие на страниците „Бренд“: фотографија, бои на фирмата, мрежа, знак
   ------------------------------------------------------------------------ */
.tx-ph--brand {
	background: var(--tx-ink);
	color: #fff;
}

.tx-ph--brand .tx-page-header__img {
	opacity: 0.42;
	filter: saturate(0.85) contrast(1.05);
	object-fit: cover;
}

.tx-ph-brand-grad {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(100deg, color-mix(in srgb, var(--tx-ink) 94%, transparent) 0%, color-mix(in srgb, var(--tx-ink) 72%, transparent) 46%, color-mix(in srgb, var(--tx-ink) 30%, transparent) 100%),
		linear-gradient(0deg, color-mix(in srgb, var(--tx-ink) 70%, transparent), transparent 55%);
}

.tx-ph-lines {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
	background-size: 72px 72px;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 75%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 75%, transparent 100%);
	animation: tx-ph-lines 40s linear infinite;
}

@keyframes tx-ph-lines {
	to { background-position: 72px 72px, 72px 72px; }
}

.tx-ph-glow {
	position: absolute;
	top: -30%;
	right: -10%;
	width: 60%;
	height: 160%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--tx-accent) 38%, transparent), transparent);
	opacity: 0.7;
	filter: blur(10px);
}

.tx-ph--brand::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: var(--tx-gutter, 24px);
	z-index: 2;
	width: 120px;
	height: 3px;
	background: var(--tx-accent);
	transform-origin: left;
	animation: tx-ph-bar 1.2s var(--tx-ease, ease) 0.4s both;
}

@keyframes tx-ph-bar {
	from { transform: scaleX(0); }
}

.tx-ph--brand .tx-ph-mark {
	color: #fff;
	opacity: 0.18;
}

.tx-ph--brand .tx-breadcrumbs a {
	color: rgba(255, 255, 255, 0.72);
}

/* Векторското лого во менито и подножјето */
.tx-logo .tx-bm {
	display: block;
	width: auto;
	max-width: none;
	height: var(--tx-logo-h, 48px);
}

.tx-header.is-scrolled .tx-logo .tx-bm {
	height: calc(var(--tx-logo-h, 48px) * 0.86);
	transition: height 0.3s ease;
}

@media (max-width: 767px) {
	.tx-logo .tx-bm {
		height: min(var(--tx-logo-h, 48px), 50px);
	}
}

/* Original brand artwork keeps its geometry throughout a short, single reveal. */
.tx-bm-anim[data-anim] .bm-faithful {
	opacity: 0;
}
.tx-bm-anim[data-anim].is-in .bm-faithful {
	opacity: 1;
	animation: bm-faithful-reveal .65s ease-out;
}
.tx-bm-anim[data-anim] .bm-faithful :is(.bm-a, .bm-b, .bm-c, .bm-t) {
	opacity: 1 !important;
	animation: none !important;
	transform: none !important;
}
.tx-bm-anim[data-anim="float"].is-in:has(.bm-faithful) {
	animation: none;
}
.tx-bm--c-white .bm-k {
	fill: #ffffff;
	stroke: #ffffff;
}
.tx-bm--c-white .bm-original-stroke { stroke: #ffffff; }
.tx-bm--c-accent .bm-original-stroke { stroke: var(--tx-accent); }
.tx-bm--c-dark .bm-original-stroke { stroke: var(--tx-ink, #111); }
@keyframes bm-faithful-reveal {
	from { opacity: 0; }
	to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.tx-bm-anim[data-anim] .bm-faithful {
		opacity: 1;
		animation: none;
	}
}
