/* Каркас: рамка, шапка, меню, строка подбора, полотно, крошки, подвал */

/* ── Шапка ───────────────────────────────────────────── */

.head {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--frame);
	color: var(--frame-text);
}

.head__in {
	height: 56px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.logo {
	margin-right: auto;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	font-family: var(--font-display);
	font-weight: 900;
	font-stretch: 87%;
	font-size: 21px;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--amber);
	text-decoration: none;
}

.icon-btn {
	width: 44px;
	height: 44px;
	flex: none;
	border-radius: 50%;
	border: 1.5px solid rgba(232, 163, 61, 0.55);
	background: transparent;
	color: var(--amber);
	display: inline-grid;
	place-items: center;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
	background: var(--amber);
	color: var(--amber-ink);
}

.icon-btn svg {
	width: 20px;
	height: 20px;
}

/* Переключатель темы: в светлой показываем луну, в тёмной — солнце */
.theme__sun {
	display: none;
}

:root[data-theme="dark"] .theme__sun {
	display: block;
}

:root[data-theme="dark"] .theme__moon {
	display: none;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme__sun {
		display: block;
	}

	:root:not([data-theme="light"]) .theme__moon {
		display: none;
	}
}

/* Бургер: две полоски превращаются в крест */
.burger__bar {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.3s var(--ease);
}

.burger {
	gap: 5px;
	align-content: center;
}

.burger[aria-expanded="true"] .burger__bar:first-child {
	transform: translateY(3.5px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__bar:last-child {
	transform: translateY(-3.5px) rotate(-45deg);
}

/* Вкладка навигации — вырез в тёмной рамке, как в журнальном макете:
   сверху широкая, книзу сужается длинными плавными скосами.
   Скосы — маска-SVG на псевдоэлементах; середина тянется под пункты. */
.tabnav,
.head__info {
	display: none;
}

@media (min-width: 1100px) {
	.head__in {
		height: 84px;
	}

	.logo {
		margin-right: 0;
		font-size: clamp(26px, 2.3vw, 34px);
	}

	/* Вкладка стоит в потоке, а не поверх: длинный логотип её не перекрывает.
	   Поля по бокам — место под скосы шириной 90px */
	.tabnav {
		position: relative;
		align-self: flex-start;
		margin: 0 auto;
		height: 64px;
		padding: 0 6px 4px;
		display: flex;
		align-items: center;
		background: var(--canvas);
		color: var(--ink);
	}

	.tabnav::before,
	.tabnav::after {
		content: "";
		position: absolute;
		top: 0;
		width: 91px;
		height: 64px;
		background: var(--canvas);
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 64' preserveAspectRatio='none'%3E%3Cpath d='M0 0H90V64H62C49 64 44 58 39 47L27 18C21 6 14 0 0 0Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 64' preserveAspectRatio='none'%3E%3Cpath d='M0 0H90V64H62C49 64 44 58 39 47L27 18C21 6 14 0 0 0Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
	}

	/* Нахлёст 1px: вкладка может встать на дробный пиксель, без него виден шов */
	.tabnav::before {
		right: calc(100% - 1px);
	}

	.tabnav::after {
		left: calc(100% - 1px);
		transform: scaleX(-1);
	}

	.tabnav a {
		position: relative;
		padding: 14px 16px;
		font-family: var(--font-display);
		font-weight: 900;
		font-stretch: 87%;
		font-size: 16px;
		line-height: 1;
		letter-spacing: 0.03em;
		text-transform: uppercase;
		white-space: nowrap;
		text-decoration: none;
	}

	.tabnav a + a::before {
		content: "+";
		position: absolute;
		left: -5px;
		top: 50%;
		transform: translateY(-50%);
		font-family: var(--font-ui);
		font-weight: 400;
		font-size: 18px;
		pointer-events: none;
	}

	.tabnav a:hover,
	.tabnav a[aria-current] {
		color: var(--amber-2);
	}

	.burger {
		display: none;
	}
}

/* Справа в шапке — регион, как дата и погода в макете */
@media (min-width: 1280px) {
	.head__info {
		margin: 0 8px 0 0;
		display: flex;
		align-items: center;
		gap: 10px;
		font-family: var(--font-display);
		font-weight: 900;
		font-stretch: 87%;
		font-size: 15px;
		letter-spacing: 0.02em;
		color: var(--frame-text);
	}

	.head__pin {
		width: 36px;
		height: 36px;
		border-radius: 50%;
		background: var(--amber);
		color: var(--amber-ink);
		display: grid;
		place-items: center;
	}

	.head__pin svg {
		width: 18px;
		height: 18px;
	}
}

/* ── Мобильное меню ──────────────────────────────────── */

.drawer {
	position: fixed;
	inset: 56px 0 0 0;
	z-index: 49;
	background: var(--frame);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.drawer[hidden] {
	display: none;
}

.drawer__in {
	padding: 8px var(--gutter) 48px;
	display: flex;
	flex-direction: column;
}

.drawer__in a {
	min-height: 60px;
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--frame-line);
	color: var(--frame-text);
	text-decoration: none;
	font-family: var(--font-display);
	font-weight: 900;
	font-stretch: 87%;
	font-size: 24px;
	text-transform: uppercase;
}

.drawer__in a:hover {
	color: var(--amber);
}

/* ── Горчичная строка подбора ───────────────────────── */

/* На телефоне — лента поводов, листается пальцем, только на главной.
   На широком экране — три части, слитые перемычками, как в макете. */
.pickbar {
	padding-top: 4px;
	padding-bottom: 16px;
	display: flex;
	align-items: center;
}

.pick-find,
.pick-neck,
.pick-all {
	display: none;
}

.pick {
	position: relative;
	z-index: 1;
	flex: 1;
	min-width: 0;
	min-height: 52px;
	display: flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 99px;
	background: var(--amber);
	color: var(--amber-ink);
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
	/* Край растворяется — видно, что строку можно листать */
	-webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
	mask-image: linear-gradient(90deg, #000 86%, transparent);
}

.pick::-webkit-scrollbar {
	display: none;
}

.pick a {
	position: relative;
	flex: none;
	scroll-snap-align: start;
	min-height: 44px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	font-family: var(--font-display);
	font-weight: 900;
	font-stretch: 87%;
	font-size: 16px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
}

.pick a + a::before {
	content: "+";
	margin: 0 14px 0 -14px;
	font-family: var(--font-ui);
	font-weight: 400;
	font-size: 18px;
}

/* Текущий повод подчёркнут, как активная рубрика в макете */
.pick a[aria-current]::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 4px;
	height: 3px;
	border-radius: 2px;
	background: currentColor;
}

.pick a:hover {
	opacity: 0.7;
}

@media (max-width: 999px) {
	.pickbar--inner {
		display: none;
	}
}

@media (min-width: 1000px) {
	.pickbar {
		padding-bottom: 20px;
	}

	.pick {
		flex: 1 1 auto;
		min-height: 56px;
		justify-content: center;
		-webkit-mask-image: none;
		mask-image: none;
	}

	.pick-all {
		position: relative;
		z-index: 1;
		flex: none;
		min-height: 56px;
		display: inline-flex;
		align-items: center;
		gap: 14px;
		padding: 0 6px 0 24px;
		border-radius: 99px;
		font-family: var(--font-display);
		font-weight: 900;
		font-stretch: 87%;
		font-size: 16px;
		letter-spacing: 0.03em;
		text-transform: uppercase;
		text-decoration: none;
	}

	.pick-find {
		justify-content: space-between;
		background: var(--amber);
		color: var(--amber-ink);
	}

	.pick-find .arrow {
		width: 44px;
		height: 44px;
	}

	.pick-find .arrow svg {
		width: 20px;
		height: 20px;
	}

	.pick-all {
		background: var(--frame);
		color: var(--frame-text);
		box-shadow: inset 0 0 0 2px var(--amber);
	}

	.pick-all .arrow {
		width: 44px;
		height: 44px;
		background: var(--amber);
		color: var(--amber-ink);
	}

	.pick-find:hover .arrow,
	.pick-all:hover .arrow {
		transform: translateX(3px);
	}

	/* Перемычка между частями: вогнутая сверху и снизу, заходит под края */
	.pick-neck {
		display: block;
		flex: none;
		width: 30px;
		height: 36px;
		margin: 0 -10px;
		background: var(--amber);
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 36' preserveAspectRatio='none'%3E%3Cpath d='M0 0C10 14 20 14 30 0V36C20 22 10 22 0 36Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 36' preserveAspectRatio='none'%3E%3Cpath d='M0 0C10 14 20 14 30 0V36C20 22 10 22 0 36Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
	}
}

/* «Подобрать группу» — только там, где хватает ширины на все поводы */
@media (min-width: 1000px) and (max-width: 1279px) {
	.pick-neck--find {
		display: none;
	}
}

@media (min-width: 1280px) {
	.pick-find {
		position: relative;
		z-index: 1;
		flex: none;
		min-height: 56px;
		display: inline-flex;
		align-items: center;
		gap: 14px;
		padding: 0 6px 0 24px;
		border-radius: 99px;
		font-family: var(--font-display);
		font-weight: 900;
		font-stretch: 87%;
		font-size: 16px;
		letter-spacing: 0.03em;
		text-transform: uppercase;
		text-decoration: none;
	}

	.pick-neck--find {
		display: block;
	}
}

/* ── Полотно ─────────────────────────────────────────── */

.canvas {
	position: relative;
	isolation: isolate;
	background-color: var(--canvas);
	border-radius: var(--r-canvas) var(--r-canvas) 0 0;
	/* Вырезки вроде микрофона в hero не должны давать горизонтальную прокрутку */
	overflow-x: clip;
	padding: clamp(24px, 4vw, 56px) 0 clamp(64px, 9vw, 120px);
}

/* Зерно бумаги — статичная плитка 160px, без фильтров: дёшево для телефона */
.canvas::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: url("../img/ui/grain.webp") repeat;
	opacity: var(--grain-opacity);
	pointer-events: none;
}

@media (min-width: 1100px) {
	.canvas {
		margin: 0 16px;
		border-radius: var(--r-canvas);
	}
}

/* ── Хлебные крошки ──────────────────────────────────── */

.crumbs {
	margin-bottom: 18px;
	font-size: 14px;
	color: var(--ink-3);
}

.crumbs ol {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.crumbs li {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
}

.crumbs li + li::before {
	content: "/";
	margin: 0 10px;
	opacity: 0.6;
}

.crumbs a {
	text-decoration: none;
}

.crumbs a:hover {
	color: var(--ink);
}

/* ── Секции ──────────────────────────────────────────── */

.section {
	margin-top: clamp(72px, 10vw, 136px);
}

.section__head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: clamp(22px, 3vw, 36px);
}

/* ── Подвал ──────────────────────────────────────────── */

.foot {
	padding: clamp(48px, 7vw, 88px) 0 40px;
	color: var(--frame-text);
}

.foot__big {
	margin: 0 0 40px;
	font-family: var(--font-display);
	font-weight: 900;
	font-stretch: 87%;
	font-size: clamp(36px, 9.6vw, 140px);
	line-height: 0.9;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--amber);
}

.foot__cols {
	display: grid;
	gap: 36px;
}

.foot__about {
	display: grid;
	gap: 20px;
	justify-items: start;
	align-content: start;
}

.foot__note {
	margin: 0;
	color: var(--frame-text-2);
	max-width: 36ch;
}

.foot__h {
	margin: 0 0 6px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--frame-line);
	font: 700 12px/1.3 var(--font-ui);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--amber);
}

.foot__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.foot__list a {
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--frame-text);
	text-decoration: none;
	transition: color 0.2s, transform 0.25s var(--ease);
}

.foot__list a:hover {
	color: var(--amber);
	transform: translateX(4px);
}

.foot__num {
	flex: none;
	min-width: 2ch;
	font: 700 12px/1 var(--font-ui);
	letter-spacing: 0.06em;
	color: var(--amber);
}

/* Нижняя строка: копирайт и документы — мельче и тише основных ссылок */
.foot__bottom {
	margin-top: 44px;
	padding-top: 16px;
	border-top: 1px solid var(--frame-line);
	display: grid;
	gap: 8px;
	font-size: 14px;
	color: var(--frame-text-2);
}

.foot__copy {
	margin: 0;
}

.foot__legal {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	column-gap: 24px;
}

.foot__legal a,
.foot__btn {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	color: var(--frame-text-2);
	text-decoration: none;
}

.foot__legal a:hover,
.foot__btn:hover {
	color: var(--amber);
}

@media (min-width: 700px) {
	.foot__cols {
		grid-template-columns: 1fr 1fr;
	}

	.foot__about {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1000px) {
	.foot__cols {
		grid-template-columns: 1.2fr 1fr 0.8fr;
		gap: 56px;
	}

	.foot__about {
		grid-column: auto;
	}

	.foot__bottom {
		grid-template-columns: auto 1fr;
		align-items: center;
	}

	.foot__legal {
		justify-content: flex-end;
	}
}

/* ── Плашка согласия на cookie (js/consent.js) ───────── */

.consent {
	position: fixed;
	left: var(--gutter);
	right: var(--gutter);
	bottom: calc(12px + env(safe-area-inset-bottom));
	z-index: 70;
	display: grid;
	gap: 12px;
	padding: 16px;
	border-radius: var(--r-lg);
	background: var(--frame);
	color: var(--frame-text);
	box-shadow: var(--shadow-float);
}

.consent__text {
	margin: 0;
	font: 400 16px/1.45 var(--font-ui);
}

.consent__text a {
	color: var(--amber);
}

.consent__btns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.consent .pill {
	justify-content: center;
	padding: 4px 16px;
}

.consent__no {
	background: transparent;
	color: var(--frame-text);
	box-shadow: inset 0 0 0 1.5px var(--frame-line);
}

@media (min-width: 700px) {
	.consent {
		right: auto;
		max-width: 520px;
		padding: 20px;
	}
}

/* Кнопка «Настройки cookie» в подвале выглядит как ссылки рядом */
.foot__btn {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	cursor: pointer;
}
