/* =============================================================
   Lyuboshchi Brands · discovery block
   Editorial-premium grid with glass cards + gradient letter sigils.
   ============================================================= */

.lyub-brands-block {
	--bb-grad:       linear-gradient(135deg, #f2053c 0%, #cb003d 100%);
	--bb-grad-soft:  linear-gradient(135deg, #ff5078 0%, #f2053c 100%);
	--bb-red:        #f2053c;
	--bb-red-soft:   #ff5078;
	--bb-text:       #1a1a2e;
	--bb-text-2:     #4b5563;
	--bb-muted:      #8b8e9d;
	--bb-bg:         #ffffff;
	--bb-surface:    #f8f8fc;
	--bb-line:       #ebebf0;
	--bb-radius:     18px;
	--bb-ease:       cubic-bezier(.4,0,.2,1);

	display: block;
	width: 100%;
	margin: 56px 0;
	font-family: 'GothamPro', system-ui, -apple-system, sans-serif;
	color: var(--bb-text);
}
.lyub-brands-block *,
.lyub-brands-block *::before,
.lyub-brands-block *::after { box-sizing: border-box; }

.lyub-brands-block__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ============================================================
   Header — editorial-magazine treatment
   ============================================================ */
.lyub-brands-block__head {
	position: relative;
	margin-bottom: 40px;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 28px;
	align-items: end;
}

/* Edition / count stamp on the left, with hairline running across */
.lyub-brands-block__kicker-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 4px;
}
.lyub-brands-block__edition {
	font-family: 'JetBrains Mono', 'Menlo', 'Courier New', monospace;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--bb-red);
	opacity: 0.85;
}
.lyub-brands-block__kicker {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--bb-muted);
}

/* Display title with accent asterisk */
.lyub-brands-block__title-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
	position: relative;
	padding-left: 32px;
}
.lyub-brands-block__title-wrap::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 1px;
	background: linear-gradient(180deg, transparent, currentColor 30%, currentColor 70%, transparent);
	opacity: 0.18;
}
.lyub-brands-block__title {
	margin: 0;
	font-size: clamp(28px, 4.5vw, 52px);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 0.95;
	color: var(--bb-text);
	text-wrap: balance;
}
.lyub-brands-block__title-accent {
	background: var(--bb-grad-soft);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.lyub-brands-block__title-asterisk {
	display: inline-block;
	color: var(--bb-red);
	font-size: 0.5em;
	vertical-align: super;
	margin-left: 0.1em;
	font-weight: 400;
}
.lyub-brands-block__subtitle {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--bb-text-2);
	max-width: 520px;
	font-style: italic;
}
.lyub-brands-block__subtitle::before {
	content: "* ";
	color: var(--bb-red);
	font-style: normal;
}

/* ============================================================
   Grid — every tile gets staggered reveal on initial paint
   ============================================================ */
.lyub-brands-block__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
	perspective: 1200px; /* enables 3D tilts on hover */
}

/* ============================================================
   Tile — glass card with gradient sigil + 3D tilt hover
   ============================================================ */
.lyub-brands-block__tile {
	list-style: none;
	animation: lyub-tile-in .6s var(--bb-ease) backwards;
}
.lyub-brands-block__tile:nth-child(1) { animation-delay: .02s; }
.lyub-brands-block__tile:nth-child(2) { animation-delay: .05s; }
.lyub-brands-block__tile:nth-child(3) { animation-delay: .08s; }
.lyub-brands-block__tile:nth-child(4) { animation-delay: .11s; }
.lyub-brands-block__tile:nth-child(5) { animation-delay: .14s; }
.lyub-brands-block__tile:nth-child(6) { animation-delay: .17s; }
.lyub-brands-block__tile:nth-child(7) { animation-delay: .2s; }
.lyub-brands-block__tile:nth-child(8) { animation-delay: .23s; }
.lyub-brands-block__tile:nth-child(9) { animation-delay: .26s; }
.lyub-brands-block__tile:nth-child(10) { animation-delay: .29s; }
.lyub-brands-block__tile:nth-child(11) { animation-delay: .32s; }
.lyub-brands-block__tile:nth-child(12) { animation-delay: .35s; }
.lyub-brands-block__tile:nth-child(13) { animation-delay: .38s; }
.lyub-brands-block__tile:nth-child(14) { animation-delay: .41s; }

@keyframes lyub-tile-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.lyub-brands-block__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 26px 14px 18px;
	background: var(--bb-bg);
	border: 1px solid var(--bb-line);
	border-radius: var(--bb-radius);
	text-decoration: none;
	color: inherit;
	height: 100%;
	position: relative;
	overflow: hidden;
	transition:
		transform .35s var(--bb-ease),
		box-shadow .35s var(--bb-ease),
		border-color .25s var(--bb-ease);
	transform-style: preserve-3d;
	will-change: transform;
}

/* Top hairline gradient — grows on hover */
.lyub-brands-block__link::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 0;
	height: 2px;
	background: var(--bb-grad);
	border-radius: 0 0 4px 4px;
	transform: translateX(-50%);
	transition: width .4s var(--bb-ease);
}

/* Red radial glow expanding from logo on hover */
.lyub-brands-block__link::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 30px;
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(242, 5, 60, 0.18), transparent 65%);
	transform: translateX(-50%) scale(0);
	transition: transform .5s var(--bb-ease);
	pointer-events: none;
	z-index: 0;
}

.lyub-brands-block__link:hover,
.lyub-brands-block__link:focus-visible {
	transform: translateY(-5px) rotateX(2deg);
	border-color: rgba(242, 5, 60, .35);
	box-shadow:
		0 28px 50px rgba(242, 5, 60, .15),
		0 6px 16px rgba(0, 0, 0, .05);
	outline: none;
}
.lyub-brands-block__link:hover::before,
.lyub-brands-block__link:focus-visible::before { width: 50%; }
.lyub-brands-block__link:hover::after,
.lyub-brands-block__link:focus-visible::after { transform: translateX(-50%) scale(1.6); }

/* ----- Logo / sigil ----- */
.lyub-brands-block__logo {
	position: relative;
	width: 72px;
	height: 72px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--bb-surface);
	border-radius: 50%;
	overflow: hidden;
	z-index: 1;
	transition:
		transform .35s var(--bb-ease),
		box-shadow .35s var(--bb-ease);
}
.lyub-brands-block__link:hover .lyub-brands-block__logo,
.lyub-brands-block__link:focus-visible .lyub-brands-block__logo {
	transform: rotate(-3deg) scale(1.06);
	box-shadow: 0 8px 20px rgba(242, 5, 60, .22);
}
.lyub-brands-block__logo img {
	max-width: 72%;
	max-height: 72%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Letter fallback — gradient orb with monogram */
.lyub-brands-block__logo:has(.lyub-brands-block__letter) {
	background: var(--bb-grad);
	box-shadow: 0 4px 18px rgba(242, 5, 60, .25),
				inset 0 1px 0 rgba(255, 255, 255, .25);
}
.lyub-brands-block__letter {
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -0.04em;
	color: #ffffff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
	font-family: 'GothamPro', sans-serif;
	font-variant-numeric: lining-nums;
}

/* ----- Brand name ----- */
.lyub-brands-block__name {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -0.005em;
	color: var(--bb-text);
	text-align: center;
	line-height: 1.25;
	z-index: 1;
	transition: color .2s var(--bb-ease);
}

/* ----- Count — monospaced lining numerals ----- */
.lyub-brands-block__count {
	font-family: 'JetBrains Mono', 'Menlo', 'Courier New', monospace;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--bb-muted);
	text-transform: lowercase;
	z-index: 1;
	font-variant-numeric: tabular-nums;
}

/* ============================================================
   Footer CTA — premium pill with arrow chase
   ============================================================ */
.lyub-brands-block__foot {
	margin-top: 40px;
	display: flex;
	justify-content: center;
}
.lyub-brands-block__all {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	background: transparent;
	border: 1.5px solid var(--bb-text);
	border-radius: 999px;
	color: var(--bb-text);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	overflow: hidden;
	transition:
		color .3s var(--bb-ease),
		border-color .3s var(--bb-ease),
		transform .2s var(--bb-ease);
}
/* Fill expanding from left on hover */
.lyub-brands-block__all::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--bb-grad);
	transform: translateX(-101%);
	transition: transform .4s var(--bb-ease);
	z-index: -1;
}
.lyub-brands-block__all > * {
	position: relative;
	z-index: 1;
}
.lyub-brands-block__all svg {
	transition: transform .25s var(--bb-ease);
}
.lyub-brands-block__all:hover {
	color: #fff;
	border-color: transparent;
	transform: translateY(-1px);
}
.lyub-brands-block__all:hover::before {
	transform: translateX(0);
}
.lyub-brands-block__all:hover svg {
	transform: translateX(5px);
}

/* ============================================================
   DARK VARIANT — premium glass on dark backgrounds
   ============================================================ */
.lyub-brands-block--dark {
	--bb-text: #ffffff;
	--bb-text-2: rgba(255, 255, 255, .72);
	--bb-muted: rgba(255, 255, 255, .48);
	--bb-bg: rgba(255, 255, 255, .03);
	--bb-surface: rgba(255, 255, 255, .06);
	--bb-line: rgba(255, 255, 255, .08);
}

.lyub-brands-block--dark .lyub-brands-block__link {
	background:
		linear-gradient(135deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .015) 100%);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.lyub-brands-block--dark .lyub-brands-block__link:hover,
.lyub-brands-block--dark .lyub-brands-block__link:focus-visible {
	background:
		linear-gradient(135deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .03) 100%);
	border-color: rgba(242, 5, 60, .55);
	box-shadow:
		0 30px 55px rgba(242, 5, 60, .25),
		0 6px 16px rgba(0, 0, 0, .35),
		inset 0 1px 0 rgba(255, 255, 255, .08);
}
.lyub-brands-block--dark .lyub-brands-block__logo {
	background: rgba(255, 255, 255, .04);
}
.lyub-brands-block--dark .lyub-brands-block__logo:has(.lyub-brands-block__letter) {
	background: var(--bb-grad);
	box-shadow:
		0 6px 22px rgba(242, 5, 60, .45),
		inset 0 1px 0 rgba(255, 255, 255, .3);
}
.lyub-brands-block--dark .lyub-brands-block__title-wrap::before {
	background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .25) 30%, rgba(255, 255, 255, .25) 70%, transparent);
}
.lyub-brands-block--dark .lyub-brands-block__all {
	border-color: rgba(255, 255, 255, .35);
	color: #fff;
}
.lyub-brands-block--dark .lyub-brands-block__all:hover {
	border-color: transparent;
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 768px) {
	.lyub-brands-block { margin: 36px 0; }
	.lyub-brands-block__inner { padding: 0 18px; }

	.lyub-brands-block__head {
		grid-template-columns: 1fr;
		gap: 14px;
		margin-bottom: 26px;
	}
	.lyub-brands-block__title-wrap {
		padding-left: 0;
	}
	.lyub-brands-block__title-wrap::before {
		display: none;
	}
	.lyub-brands-block__title {
		font-size: clamp(26px, 8vw, 38px);
	}

	.lyub-brands-block__grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 10px;
	}
	.lyub-brands-block__link {
		padding: 20px 10px 14px;
		gap: 10px;
	}
	.lyub-brands-block__logo {
		width: 60px;
		height: 60px;
	}
	.lyub-brands-block__letter { font-size: 26px; }
	.lyub-brands-block__name { font-size: 12.5px; }
	.lyub-brands-block__count { font-size: 10.5px; }

	.lyub-brands-block__foot { margin-top: 28px; }
	.lyub-brands-block__all {
		padding: 12px 22px;
		font-size: 11.5px;
	}
}

@media (max-width: 420px) {
	.lyub-brands-block__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lyub-brands-block__tile { animation: none !important; }
	.lyub-brands-block__link,
	.lyub-brands-block__link::before,
	.lyub-brands-block__link::after,
	.lyub-brands-block__logo,
	.lyub-brands-block__all,
	.lyub-brands-block__all::before,
	.lyub-brands-block__all svg {
		transition: none !important;
		transform: none !important;
	}
}
