/* Kusochki — Hero + выбор ресторана (standalone plugin)
 * Извлечено из боевой темы norebro-kusochki-extra:
 *   assets/css/design-system.css  → токены + scoped reset
 *   assets/css/blocks.css (строки 5–328) → секция kusochki_hero
 * + кастомные стили выбора ресторана (.ks-hero__picks / .ks-hero__pick).
 */

:root {
	--ks-bg:    #FDFAF4;
	--ks-dark:  #16122B;
	--ks-red:   #E42B2B;
	--ks-red-h: #B01E1E;
	--ks-muted: #888;
	--ks-border:#E5E0D6;

	--ks-font-display: 'Unbounded', 'Inter', sans-serif;
	--ks-font-body:    'Golos Text', 'Inter', sans-serif;

	--ks-container: 1200px;
	--ks-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ─── Scoped reset (из design-system.css) ─────────────────────────────
 * Делает hero одинаковым в любой теме: сбрасывает box-sizing, ссылки и
 * заголовки/параграфы внутри элементов .ks-*. :where() = нулевая
 * специфичность, чтобы наши классы легко перебивали reset. */
:where([class*="ks-"]) *,
:where([class*="ks-"]) *::before,
:where([class*="ks-"]) *::after { box-sizing: border-box; }

:where([class*="ks-"]) a { color: inherit; text-decoration: none; }

:where([class*="ks-"]) h1,
:where([class*="ks-"]) h2,
:where([class*="ks-"]) h3,
:where([class*="ks-"]) p {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-weight: inherit;
	color: inherit;
	letter-spacing: normal;
	line-height: inherit;
}

:where([class*="ks-"]) img,
:where([class*="ks-"]) video { max-width: 100%; display: block; }

/* Защита от чужих тем: гасим внешние верт. отступы у самой секции. */
.ks-hero { margin-top: 0 !important; margin-bottom: 0 !important; }

/* ─── kusochki_hero ───────────────────────────────────────────────── */
.ks-hero {
	position: relative;
	overflow: hidden;
	min-height: 100vh;
	padding: 120px 40px 80px;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: 100vw;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.ks-hero__bgtext {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-family: var(--ks-font-display);
	font-weight: 900;
	font-size: 22vw;
	color: rgba(22, 18, 43, 0.03);
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
	letter-spacing: -0.04em;
	z-index: 0;
}

.ks-hero__inner {
	position: relative;
	z-index: 2;
	max-width: var(--ks-container);
	width: 100%;
}

.ks-hero__tag {
	display: inline-block;
	border: 1.5px solid var(--ks-red);
	background: var(--ks-bg, #FDFAF4);
	color: var(--ks-red);
	font-family: var(--ks-font-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding: 6px 16px;
	border-radius: 30px;
	margin-bottom: 28px;
	animation: ks-fadeUp .7s ease both;
	position: relative;
	z-index: 5;
}

.ks-hero__title {
	font-family: var(--ks-font-display);
	font-weight: 900;
	font-size: clamp(52px, 8vw, 110px);
	line-height: .92;
	letter-spacing: -0.04em;
	color: var(--ks-dark);
	margin: 0 0 24px;
	animation: ks-fadeUp .7s ease .1s both;
	text-shadow: 0 0 24px var(--ks-bg, #FDFAF4), 0 0 40px var(--ks-bg, #FDFAF4);
}
.ks-hero__title em { color: var(--ks-red); font-style: normal; }

.ks-hero__sub {
	font-family: var(--ks-font-body);
	font-size: clamp(15px, 1.8vw, 19px);
	color: var(--ks-dark);
	max-width: 560px;
	margin: 0 auto 44px;
	line-height: 1.55;
	animation: ks-fadeUp .7s ease .2s both;
	font-weight: 500;
	text-shadow: 0 0 18px var(--ks-bg, #FDFAF4), 0 0 30px var(--ks-bg, #FDFAF4);
}
.ks-hero__sub strong { color: var(--ks-dark); font-weight: 700; }

/* ─── Выбор ресторана (заменяет .ks-hero__btns) ───────────────────── */
.ks-hero__picks {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	animation: ks-fadeUp .7s ease .3s both;
	position: relative;
	z-index: 5;
}
.ks-hero__picks-label {
	font-family: var(--ks-font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ks-muted);
}
.ks-hero__picks-row {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}
.ks-hero__pick {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	min-width: 210px;
	padding: 16px 34px;
	border-radius: 14px;
	border: 2px solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s var(--ks-ease), border-color .2s var(--ks-ease),
	            transform .2s var(--ks-ease), box-shadow .2s var(--ks-ease);
}
.ks-hero__pick-name {
	font-family: var(--ks-font-display);
	font-weight: 900;
	font-size: 16px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.1;
}
.ks-hero__pick-addr {
	font-family: var(--ks-font-body);
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 0.03em;
	opacity: .78;
}
/* Экстра — красная (primary). !important на color: некоторые темы красят <a>. */
.ks-hero__pick--extra,
.ks-hero__pick--extra:link,
.ks-hero__pick--extra:visited {
	background: var(--ks-red);
	border-color: var(--ks-red);
	color: #fff !important;
}
.ks-hero__pick--extra:hover,
.ks-hero__pick--extra:focus,
.ks-hero__pick--extra:active {
	background: var(--ks-red-h);
	border-color: var(--ks-red-h);
	color: #fff !important;
	transform: translateY(-3px);
	box-shadow: 0 14px 34px rgba(228, 43, 43, 0.32);
}
/* Винтаж — тёмная (secondary). */
.ks-hero__pick--vintage,
.ks-hero__pick--vintage:link,
.ks-hero__pick--vintage:visited {
	background: var(--ks-dark);
	border-color: var(--ks-dark);
	color: #fff !important;
}
.ks-hero__pick--vintage:hover,
.ks-hero__pick--vintage:focus,
.ks-hero__pick--vintage:active {
	background: #2A2347;
	border-color: #2A2347;
	color: #fff !important;
	transform: translateY(-3px);
	box-shadow: 0 14px 34px rgba(22, 18, 43, 0.4);
}
a.ks-hero__pick:hover,
a.ks-hero__pick:focus,
a.ks-hero__pick:active { text-decoration: none !important; }

/* ─── Индикатор скролла (опционально) ─────────────────────────────── */
.ks-hero__scroll {
	position: absolute;
	bottom: 32px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var(--ks-muted);
	font-family: var(--ks-font-body);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	animation: ks-fadeUp .7s ease 1.2s both;
	z-index: 2;
}
.ks-hero__scroll-line {
	width: 1px;
	height: 40px;
	background: var(--ks-muted);
	animation: ks-scrollAnim 1.4s ease-in-out infinite;
}

@keyframes ks-fadeUp     { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes ks-scrollAnim { 0%, 100% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }

/* ─── Видео/фото-фон в hero — только мобайл (default скрыт) ────────── */
.ks-hero__bg-video,
.ks-hero__bg-video-overlay { display: none; }

/* ─── Картинка по центру (только ПК), 130% высоты hero, под текстом ── */
.ks-hero__pc-image { display: none; }
@media (min-width: 901px) {
	.ks-hero__pc-image {
		display: block;
		position: absolute;
		bottom: -32%;
		left: 50%;
		transform: translateX(-50%);
		height: 130%;
		width: auto;
		max-width: none;
		z-index: 2;
		opacity: 0.75;
		pointer-events: none;
		user-select: none;
	}
	.ks-hero__inner { position: relative; z-index: 3; }
}
@media (min-width: 901px) and (max-width: 1500px) {
	.ks-hero__pc-image { bottom: -20%; }
	.ks-hero__inner { transform: translateY(10%); }
}

/* ─── Плавающие слова по бокам hero (только ПК) ───────────────────── */
.ks-hero__words { display: none; }
@media (min-width: 901px) {
	.ks-hero__words {
		display: block;
		position: absolute;
		inset: 0;
		pointer-events: none;
		z-index: 0;
	}
	.ks-hero__word {
		position: absolute;
		transform: translate(-50%, -50%);
		font-family: var(--ks-font-display);
		font-weight: 900;
		font-size: clamp(56px, 5.6vw, 96px);
		letter-spacing: -0.01em;
		text-transform: uppercase;
		white-space: nowrap;
		color: rgba(22, 18, 43, 0.55);
		opacity: 0;
		filter: blur(0.5px);
		animation: ks-hero-word-l 9.6s ease-in-out infinite;
		will-change: opacity, transform;
		z-index: 0;
	}
	.ks-hero__word--l { animation-name: ks-hero-word-l; }
	.ks-hero__word--r { animation-name: ks-hero-word-r; color: rgba(214, 31, 38, 0.45); }
	.ks-hero__word--r:nth-child(odd) { color: rgba(22, 18, 43, 0.5); }
}
@keyframes ks-hero-word-l {
	0%, 100% { opacity: 0;    transform: translate(calc(-50% - 24px), -50%); }
	18%, 28% { opacity: 0.22; transform: translate(-50%, -50%); }
	40%      { opacity: 0;    transform: translate(calc(-50% + 24px), calc(-50% - 16px)); }
}
@keyframes ks-hero-word-r {
	0%, 100% { opacity: 0;    transform: translate(calc(-50% + 24px), -50%); }
	18%, 28% { opacity: 0.22; transform: translate(-50%, -50%); }
	40%      { opacity: 0;    transform: translate(calc(-50% - 24px), calc(-50% - 16px)); }
}

@media (max-width: 900px) {
	.ks-hero { padding: 120px 20px 80px; min-height: auto; }
	.ks-hero__bgtext { font-size: 36vw; }
}

@media (max-width: 700px) {
	.ks-hero {
		min-height: 100vh;
		min-height: 100dvh;
		padding: 100px 20px 80px;
		justify-content: center;
	}
	/* Белый текст и видео-фон включаются ТОЛЬКО при заданном фоне (.ks-hero--has-bg).
	   Без фона мобайл остаётся светлым (тёмный текст на --ks-bg) — читаемо. */
	.ks-hero--has-bg { color: #fff; }
	.ks-hero--has-bg .ks-hero__bg-video {
		display: block;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
		z-index: 0;
	}
	.ks-hero--has-bg .ks-hero__bg-video-overlay {
		display: block;
		position: absolute;
		inset: 0;
		background: linear-gradient(180deg, rgba(22,18,43,0.35) 0%, rgba(22,18,43,0.55) 60%, rgba(22,18,43,0.75) 100%);
		z-index: 1;
	}
	.ks-hero__inner { position: relative; z-index: 2; }
	.ks-hero__tag,
	.ks-hero__scroll,
	.ks-hero__bgtext { display: none !important; }
	.ks-hero--has-bg .ks-hero__title,
	.ks-hero--has-bg .ks-hero__sub { color: #fff; }
	.ks-hero--has-bg .ks-hero__title em { color: var(--ks-red); }
	.ks-hero--has-bg .ks-hero__sub strong { color: #fff; }
}
