/* K.O.T. wordmark → Knock Out Time */

.kot-logo-brand {
	position: relative;
	display: inline-block;
	vertical-align: baseline;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	color: #000;
	user-select: none;
}

.kot-logo-brand__stage {
	position: relative;
	display: inline-block;
	overflow: visible;
	isolation: isolate;
}

/* Warstwy: trail (1) < kulka (w cap) < litery */
.kot-logo-brand__trail {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	overflow: visible;
}

.kot-logo-brand__row {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: flex-start;
	white-space: nowrap;
	gap: 0.02em;
}

.kot-logo-brand__col {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}

.kot-logo-brand__cap {
	display: inline-flex;
	align-items: baseline;
	position: relative;
	isolation: isolate;
}

.kot-logo-brand__letter-wrap {
	position: relative;
	z-index: 3;
	display: inline-block;
	line-height: 1;
}

.kot-logo-brand__letter {
	display: inline-block;
	line-height: 1;
	color: #000000;
	/* delikatniejszy glow niż wcześniej */
	text-shadow:
		0 0 4px #dc2626,
		0 0 10px rgba(220, 38, 38, 0.85),
		0 0 20px rgba(220, 38, 38, 0.55);
	transition: color 0.22s ease, text-shadow 0.22s ease;
}

.kot-logo-brand__letter.is-infected {
	color: #dc2626;
	text-shadow:
		0 0 6px #dc2626,
		0 0 14px #dc2626,
		0 0 28px rgba(220, 38, 38, 0.9);
}

.kot-logo-brand__dot {
	position: relative;
	z-index: 0;
	display: inline-block;
	flex-shrink: 0;
	width: 0.2em;
	height: 0.2em;
	margin: 0 0.08em;
	border-radius: 50%;
	background: #000000;
	box-shadow:
		0 0 5px #dc2626,
		0 0 12px #dc2626,
		0 0 22px rgba(220, 38, 38, 0.95),
		0 0 36px rgba(220, 38, 38, 0.55);
	vertical-align: baseline;
	transform: none;
	transform-origin: 50% 100%;
	opacity: 1;
	visibility: visible;
}

.kot-logo-brand__dot.is-hidden {
	opacity: 0;
	visibility: hidden;
}

.kot-logo-brand__dot.is-flying {
	z-index: 0;
}

/* Placek na górze litery */
.kot-logo-brand__splat {
	position: absolute;
	left: 50%;
	top: 0.08em;
	width: 0.2em;
	height: 0.2em;
	margin: 0 0 0 -0.1em;
	border-radius: 50%;
	background: #000000;
	box-shadow:
		0 0 5px #dc2626,
		0 0 12px #dc2626,
		0 0 20px rgba(220, 38, 38, 0.9);
	opacity: 0;
	pointer-events: none;
	transform: scale(0.2, 0.2);
	transform-origin: 50% 50%;
	z-index: 2;
}

.kot-logo-brand__splat.is-active {
	opacity: 1;
	animation: kot-logo-splat 0.42s cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}

.kot-logo-brand__splat.is-absorb {
	animation: kot-logo-splat-absorb 0.28s ease-in forwards;
}

@keyframes kot-logo-splat {
	0% {
		opacity: 1;
		background: #000000;
		box-shadow:
			0 0 5px #dc2626,
			0 0 12px #dc2626;
		transform: scale(1, 1);
		border-radius: 50%;
	}
	28% {
		/* placek + czerwony */
		background: #dc2626;
		box-shadow:
			0 0 8px #dc2626,
			0 0 18px rgba(220, 38, 38, 0.95),
			0 0 28px rgba(220, 38, 38, 0.55);
		transform: scale(1.65, 0.32);
		border-radius: 40%;
	}
	100% {
		/* kurczy się jako czerwony placek */
		opacity: 1;
		background: #dc2626;
		box-shadow:
			0 0 6px #dc2626,
			0 0 14px rgba(220, 38, 38, 0.85);
		transform: scale(0.55, 0.18);
		border-radius: 35%;
	}
}

@keyframes kot-logo-splat-absorb {
	0% {
		opacity: 1;
		background: #dc2626;
		transform: scale(0.55, 0.18);
	}
	100% {
		opacity: 0;
		background: #dc2626;
		transform: scale(0.08, 0.08) translateY(-0.2em);
	}
}

.kot-logo-brand__cap.is-impact .kot-logo-brand__letter-wrap {
	animation: kot-logo-impact 0.28s ease-out;
}

@keyframes kot-logo-impact {
	0% {
		transform: translateY(0) scale(1);
	}
	40% {
		transform: translateY(0.06em) scale(1.04, 0.92);
	}
	100% {
		transform: translateY(0) scale(1);
	}
}

/* Stack: nock / ut / ime */
.kot-logo-brand__stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 0.12em;
	min-height: 0;
	gap: 0.02em;
}

.kot-logo-brand__stack-letter {
	display: block;
	/* 2× mniejsze niż litery główne */
	font-size: 0.5em;
	line-height: 1.1;
	color: #000000;
	text-shadow:
		0 0 4px #dc2626,
		0 0 10px rgba(220, 38, 38, 0.85),
		0 0 20px rgba(220, 38, 38, 0.55);
	opacity: 0;
	transform: translateY(-0.25em);
}

.kot-logo-brand__stack-letter.is-shown {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.42s ease, transform 0.5s cubic-bezier(0.22, 0.85, 0.3, 1);
}

/* Powrót: litera znika opacity → kulka (½ głównej) pojawia się → lot */
.kot-logo-brand__stack-letter.is-fading {
	opacity: 0 !important;
	transition: opacity 0.48s ease !important;
	pointer-events: none;
}

.kot-logo-brand__return-ball {
	position: absolute;
	z-index: 6;
	/* połowa głównej kulki (główna = 0.2em) — czerwona, żeby było widać na małym chrome */
	width: 0.1em;
	height: 0.1em;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	background: #dc2626;
	box-shadow:
		0 0 5px #dc2626,
		0 0 12px #dc2626,
		0 0 22px rgba(220, 38, 38, 0.95),
		0 0 34px rgba(220, 38, 38, 0.65);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%);
	transform-origin: 50% 50%;
	will-change: left, top, opacity, transform;
}

.kot-logo-brand__return-ball.is-appearing {
	animation: kot-logo-return-ball-in 0.48s ease forwards;
}

.kot-logo-brand__return-ball.is-landing {
	animation: kot-logo-return-land 0.26s ease-out forwards;
}

.kot-logo-brand__return-ball.is-consumed {
	opacity: 0 !important;
	visibility: hidden;
}

/* Soft glow: od punktu spotkania na zewnątrz (~1 s), z niego wychodzi główna */
.kot-logo-brand__gather-flash {
	position: absolute;
	z-index: 7;
	width: 1.1em;
	height: 1.1em;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.2);
	background: radial-gradient(
		circle,
		rgba(220, 38, 38, 0.45) 0%,
		rgba(220, 38, 38, 0.22) 35%,
		rgba(220, 38, 38, 0.08) 58%,
		transparent 75%
	);
	box-shadow:
		0 0 14px rgba(220, 38, 38, 0.7),
		0 0 32px rgba(220, 38, 38, 0.45);
	filter: blur(1.5px);
}

.kot-logo-brand__gather-flash.is-active {
	animation: kot-logo-gather-flash 1s ease-out forwards;
}

.kot-logo-brand__dot.is-settle {
	animation: kot-logo-main-ball-settle 0.55s cubic-bezier(0.22, 0.85, 0.3, 1);
}

@keyframes kot-logo-return-ball-in {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

@keyframes kot-logo-return-land {
	0% {
		transform: translate(-50%, -50%) scale(1.15);
		opacity: 1;
	}
	100% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 0;
	}
}

@keyframes kot-logo-gather-flash {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0.15);
		filter: blur(2px);
	}
	18% {
		opacity: 0.95;
		transform: translate(-50%, -50%) scale(0.85);
		filter: blur(1.5px);
	}
	45% {
		opacity: 0.85;
		transform: translate(-50%, -50%) scale(1.25);
		filter: blur(1.5px);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(1.7);
		filter: blur(2.5px);
	}
}

@keyframes kot-logo-main-ball-settle {
	0% {
		transform: scale(0.15);
		opacity: 0;
		background: #dc2626;
		box-shadow:
			0 0 12px rgba(220, 38, 38, 0.95),
			0 0 28px rgba(220, 38, 38, 0.75);
	}
	55% {
		transform: scale(1.08);
		opacity: 1;
		background: #000000;
	}
	100% {
		transform: none;
		opacity: 1;
		background: #000000;
		box-shadow:
			0 0 5px #dc2626,
			0 0 12px #dc2626,
			0 0 22px rgba(220, 38, 38, 0.95),
			0 0 36px rgba(220, 38, 38, 0.55);
	}
}

/* Sizes */
.kot-logo-brand--chrome {
	/* Jak Feat.Guru menu (BrandWordmark md) */
	font-size: 1.25rem;
}

/* Chrome: stack wystaje poniżej paska (nie pcha menu) */
.kot-logo-brand--chrome .kot-logo-brand__stage {
	padding-bottom: 0.2em;
	/* rezerwuje miejsce wizualne, layout chrome zablokowany na 64px */
	min-height: 5.6em;
}

.kot-logo-brand--footer .kot-logo-brand__stage {
	padding-bottom: 0.2em;
	min-height: 5.6em;
}

.kot-logo-brand--footer {
	/* Jak F.L.O.W. stopka */
	font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.kot-logo-brand--hero {
	font-size: clamp(3.25rem, 14vw, 6.5rem);
}

.kot-chrome__logo .kot-logo-brand {
	display: block;
	overflow: visible;
}

.kot-footer__brand {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	margin: 22px 0 18px;
	padding-bottom: 0.5em;
	min-height: 6.2em;
	overflow: visible;
}

/* Ten sam wąski divider co pod wordmarkiem — w slocie, bez przesuwania layoutu */
.kot-footer__brand-rule {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 42%;
	max-width: 42%;
	margin: 0;
}

/* Wordmark niżej w slocie — bez odpychania dividera / linków pod spodem */
.kot-footer__brand .kot-logo-brand-wrap,
.kot-footer__brand .kot-logo-brand {
	margin-top: 1.35em;
	margin-bottom: -1.35em;
}

.kot-chrome__logo {
	overflow: visible;
}

@media (max-width: 640px) {
	.kot-logo-brand--chrome {
		font-size: 1.15rem;
	}

	.kot-logo-brand--chrome .kot-logo-brand__stage {
		min-height: 5.4em;
	}

	.kot-footer__brand {
		min-height: 5.8em;
		margin-bottom: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kot-logo-brand__stack {
		display: none;
	}

	.kot-logo-brand__splat,
	.kot-logo-brand__trail {
		display: none;
	}
}
