/* ==========================================================================
   match.css — страница «Заказать матч»: /matchmaking/ (matchmaking.tpl).

   ИСТОЧНИК — html_flat/starco_matchmaking_concept.html. Из дословного куска
   (migrate/css_draft/match.css) убраны 42 правила, уже лежащих в base.css,
   плюс шапка, подвал, .reveal и брейкпоинты общих узлов.

   ЧЕГО ЗДЕСЬ НЕТ ИЗ КОНЦЕПТА И ПОЧЕМУ:
     .video-section  — ролик-вставка: s_videos пуста, и раздел /video/ ведёт
                       другой шаблон; дублировать плеер нечем;
     .impact-*       — блок «цифры» повторял те же четыре числа, что и
                       .hero-stats в шапке. Оставлена одна копия — в шапке;
     .budget/.price  — карточка «5 млн ₽»: сумма это коммерческое условие,
                       её нельзя зашивать в тему, а отдельной сущности под
                       неё в базе нет. См. отчёт фазы 10;
     .social-*       — длинный текст про социальную программу: его место в
                       body страницы (TinyMCE), а не в вёрстке.
   ========================================================================== */

/* --------------------------------------------------------------- секции -- */
/* Заголовки здесь мельче, чем в истории, — так в концепте; поэтому правила
   постраничные, а не общие. hyphens:none — на узких экранах браузер иначе
   рвёт «мероприятие» посреди слова. */
.section { padding: 98px 0; }

.section-title {
	margin: 15px 0 22px;
	font-size: clamp(38px, 4.6vw, 66px);
	line-height: .95;
	letter-spacing: -.052em;
	font-weight: 950;
	text-transform: uppercase;
	text-wrap: balance;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}
.section-copy {
	max-width: 800px;
	font-size: 18px;
	line-height: 1.72;
	color: #536176;
}

/* Ховеры кнопок в base.css не попали, а нужны на каждой странице. Править
   base.css из постраничной задачи нельзя — см. отчёт фазы 10. */
.btn-red:hover { transform: translateY(-2px); background: #bd0710; }
.btn-light:hover { transform: translateY(-2px); }

/* ----------------------------------------------------------------- шапка -- */
/* .page-head — то, что в концепте зовётся .hero. Тёмная обязательно: шапка
   сайта position:fixed и белая по тексту. */
.page-head {
	position: relative;
	overflow: hidden;
	padding: 148px 0 70px;
	color: #fff;
	background:
		radial-gradient(circle at 84% 18%, rgba(230, 192, 76, .13), transparent 18%),
		radial-gradient(circle at 14% 80%, rgba(217, 8, 18, .12), transparent 24%),
		linear-gradient(128deg, var(--navy2), var(--navy) 52%, #0a518f);
}
.page-head:before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(118deg, transparent 0 88px, rgba(255, 255, 255, .025) 89px 90px);
}
.page-head:after {
	content: "MATCH";
	position: absolute;
	right: -24px;
	bottom: -65px;
	pointer-events: none;
	font-size: clamp(150px, 18vw, 300px);
	font-weight: 950;
	line-height: .76;
	letter-spacing: -.09em;
	color: transparent;
	-webkit-text-stroke: 2px rgba(255, 255, 255, .05);
}

.page-head .container { position: relative; z-index: 2; }

.hero-grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 1fr .82fr;
	gap: 70px;
	align-items: end;
}
/* Плиток нет — вторая колонка не нужна, иначе заголовок остаётся сжатым
   рядом с пустым местом. Класс вешает шаблон. */
.hero-grid.is-single { grid-template-columns: 1fr; }

.hero-copy h1 {
	margin: 18px 0 22px;
	font-size: clamp(55px, 6.6vw, 96px);
	line-height: .84;
	letter-spacing: -.065em;
	font-weight: 950;
	text-transform: uppercase;
	text-wrap: balance;
}

.page-intro { max-width: 720px; font-size: 18px; line-height: 1.65; color: rgba(255, 255, 255, .72); }
.page-intro p { margin: 0 0 14px; }
.page-intro a { color: #fff; text-decoration: underline; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Плитки с цифрами. Их ровно столько, сколько блоков в match_stats:
   auto-fit держит сетку целой и при трёх, и при пяти. */
.hero-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 11px;
}
.hero-stat {
	min-height: 132px;
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, .13);
	border-radius: 22px;
	background: rgba(255, 255, 255, .06);
	backdrop-filter: blur(8px);
}
.hero-stat b { display: block; font-size: 38px; line-height: .9; letter-spacing: -.05em; color: #fff; }
.hero-stat span { display: block; margin-top: 10px; font-size: 11px; line-height: 1.35; font-weight: 800; color: #cce6ff; }

/* --------------------------------------------------------- формат события -- */
.format { background: linear-gradient(180deg, #f7fafc, #fff); }
.format-head {
	display: grid;
	grid-template-columns: .82fr 1.18fr;
	gap: 70px;
	align-items: end;
	margin-bottom: 38px;
}
.format-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
}
.format-card {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 300px;
	padding: 27px;
	border: 1px solid var(--line);
	border-radius: 25px;
	background: #fff;
	transition: .3s;
}
.format-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

/* ЦВЕТ КАРТОЧКИ — ОТ ПОРЯДКА, А НЕ ОТ ДАННЫХ. Класс is-tone-N вешает
   шаблон по остатку от деления НОМЕРА С НУЛЯ ({$b@index}) на 4. Так
   менеджер не может собрать четыре одинаковые плитки, и в админке нет
   лишнего поля «цвет». is-tone-1 — обычная белая, правила ей не нужно. */
.format-card.is-tone-0 { border: 0; background: linear-gradient(145deg, var(--blue), #0b66ad); color: #fff; }
.format-card.is-tone-2 { border: 0; background: linear-gradient(145deg, #b70810, var(--red2)); color: #fff; }
.format-card.is-tone-3 { border: 0; background: linear-gradient(145deg, #0b2947, #03172b); color: #fff; }

.format-no { font-size: 11px; font-weight: 950; letter-spacing: .13em; text-transform: uppercase; color: var(--red); }
.format-card h3 { margin: 0 0 10px; font-size: 27px; line-height: 1.02; letter-spacing: -.04em; }
.format-card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

.is-tone-0 .format-no, .is-tone-2 .format-no, .is-tone-3 .format-no { color: #cce6ff; }
.is-tone-0 p, .is-tone-2 p, .is-tone-3 p { color: rgba(255, 255, 255, .68); }

/* --------------------------------------------------------- кому подходит -- */
.audience { background: #fff; }
.audience-head {
	display: grid;
	grid-template-columns: .82fr 1.18fr;
	gap: 70px;
	align-items: end;
	margin-bottom: 38px;
}
.audience-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}
.aud-card {
	min-height: 180px;
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: #fff;
}
.aud-card b {
	display: block;
	margin-bottom: 14px;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--red);
}
.aud-card h3 { margin: 0; font-size: 22px; line-height: 1.08; color: var(--navy); }
.aud-card p { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* -------------------------------------------------------------- состав ---- */
.roster { background: #f7fafc; }
.roster-head {
	display: grid;
	grid-template-columns: .8fr 1.2fr;
	gap: 70px;
	align-items: end;
}
.roster-controls {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin: 30px 0 22px;
}
.search {
	flex: 1;
	min-width: 280px;
	padding: 14px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #fff;
	outline: none;
}
.search:focus { border-color: var(--blue); }
.count { font-size: 12px; font-weight: 800; color: var(--muted); }

.person-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.person-row {
	display: grid;
	grid-template-columns: 42px 1fr;
	gap: 12px;
	align-items: start;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: #fff;
}
/* ОБЯЗАТЕЛЬНО. filter.js прячет карточку атрибутом hidden, а браузерное
   [hidden]{display:none} проигрывает нашему display:grid по специфичности —
   без этой строки поиск «работает», но ничего не прячет. */
.person-row[hidden] { display: none; }

.person-no { padding-top: 4px; font-size: 10px; font-weight: 950; color: var(--red); }
.person-row h4 { margin: 0 0 5px; font-size: 16px; line-height: 1.1; color: var(--navy); }
.person-row h4 a:hover { color: var(--blue); }
.person-row p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }

/* ------------------------------------------------------------- коллаж ----- */
.team-visual { background: var(--navy); color: #fff; }
.team-visual .eyebrow { color: #cce6ff; }
.team-head {
	display: flex;
	justify-content: space-between;
	gap: 30px;
	align-items: end;
	margin-bottom: 35px;
}
.team-collage {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}
.portrait-card {
	position: relative;
	overflow: hidden;
	display: block;
	min-height: 410px;
	border-radius: 24px;
	background: linear-gradient(150deg, #083e72, #02162a);
}
.portrait-card img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 18%;
}
/* Затемнение снизу — под подпись; на самом снимке имя иначе не читается. */
.portrait-card:after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(4, 29, 61, .85));
}
.portrait-fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: 64px;
	font-weight: 950;
	letter-spacing: -.04em;
	color: rgba(255, 255, 255, .3);
}
.portrait-name {
	position: absolute;
	z-index: 2;
	left: 22px;
	right: 22px;
	bottom: 20px;
	font-size: 19px;
	font-weight: 900;
	line-height: 1.15;
}

/* ----------------------------------------------------------------- CTA ---- */
.cta {
	position: relative;
	overflow: hidden;
	padding: 84px 0;
	background: linear-gradient(125deg, var(--red), #b7080f 56%, #071d35);
	color: #fff;
}
.cta:after {
	content: "★";
	position: absolute;
	right: 2%;
	top: -58px;
	font-size: 290px;
	font-weight: 950;
	line-height: 1;
	color: rgba(255, 255, 255, .055);
}
.cta-grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 40px;
	align-items: center;
}
.cta h2 {
	margin: 0 0 15px;
	font-size: clamp(39px, 5.2vw, 69px);
	line-height: .91;
	letter-spacing: -.058em;
	text-transform: uppercase;
	text-wrap: balance;
}
.cta p { max-width: 760px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .73); }

.contact-line { display: grid; gap: 8px; text-align: right; }
.contact-line a { font-size: 20px; font-weight: 950; }
.contact-line a:hover { color: var(--gold); }
.contact-line span { font-size: 12px; color: rgba(255, 255, 255, .62); }
.contact-line .contact-more { font-size: 13px; font-weight: 800; color: rgba(255, 255, 255, .8); }

/* ------------------------------------------------------------ брейкпоинты -- */
@media (max-width: 1180px) {
	.hero-grid,
	.format-head,
	.audience-head,
	.roster-head { grid-template-columns: 1fr; }

	.hero-stats { margin-top: 10px; }
}

@media (max-width: 820px) {
	.section { padding: 76px 0; }
	.page-head { padding: 130px 0 52px; }
	.hero-grid { gap: 40px; }
	.person-list { grid-template-columns: 1fr; }
	.cta-grid { grid-template-columns: 1fr; }
	.contact-line { text-align: left; }
}

@media (max-width: 560px) {
	.page-head { padding: 120px 0 44px; }
	.hero-copy h1 { font-size: 50px; }
	.page-intro { font-size: 16px; }
	.hero-stats { grid-template-columns: 1fr 1fr; }
	.hero-stat { min-height: 112px; padding: 16px; }
	.hero-stat b { font-size: 31px; }
	.format-card { min-height: 250px; }
	.portrait-card { min-height: 340px; }
	.team-head { flex-direction: column; align-items: flex-start; }
}
