/*
 * Reel — дизайн-система.
 *
 * Логика палитры: превью работ сами по себе яркие, поэтому обвязка сайта
 * молчит и отдаёт весь цвет контенту. Тёплая бумага + вермильон читаются
 * как редакционная вёрстка и киноплакат, а не как типовой SaaS-шаблон.
 */

/* ---------- Шрифты (самохост, без внешних запросов) ---------- */

@font-face {
	font-family: 'Satoshi';
	src: url('../fonts/satoshi-500.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Satoshi';
	src: url('../fonts/satoshi-700.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Satoshi';
	src: url('../fonts/satoshi-900.woff2') format('woff2');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Inter';
	src: url('../fonts/inter-var.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* ---------- Reset ----------
   Своими силами: раньше нормализацию давала Astra. */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl {
	margin: 0;
}

ul[class],
ol[class] {
	padding: 0;
	list-style: none;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	background: none;
	border: 0;
}

a {
	color: inherit;
}

/* ---------- Токены ---------- */

:root {
	--reel-paper: #fafaf8;
	--reel-surface: #f1f0ec;
	--reel-ink: #14110f;
	--reel-muted: #6b6560;
	--reel-line: #e2e0da;
	--reel-accent: #d8452b;

	--reel-font-head: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--reel-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--reel-wrap: 1180px;
	--reel-gap: clamp(2.5rem, 6vw, 6rem);
}

/* ---------- База ---------- */

.reel {
	background: var(--reel-paper);
	color: var(--reel-ink);
	font-family: var(--reel-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

.reel-wrap {
	width: 100%;
	max-width: var(--reel-wrap);
	margin: 0 auto;
	padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.reel h1,
.reel h2,
.reel h3 {
	font-family: var(--reel-font-head);
	font-weight: 900;
	letter-spacing: -0.02em;
	line-height: 1.08;
	margin: 0;
	text-wrap: balance;
}

.reel p {
	margin: 0;
}

.reel a {
	color: var(--reel-accent);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.18s ease;
}

.reel a:hover {
	border-bottom-color: var(--reel-accent);
}

.reel section {
	padding-block: var(--reel-gap);
}

.reel-section__title {
	font-size: clamp(1.75rem, 3.5vw, 2.75rem);
	margin-bottom: 1rem;
}

.reel-section__lead {
	color: var(--reel-muted);
	max-width: 46ch;
	margin-bottom: 2.5rem;
}

.reel-prose {
	max-width: 62ch;
}

.reel-prose p + p {
	margin-top: 1rem;
}

/* ---------- Своя шапка и футер (вместо Astra) ---------- */

.reel-body {
	background: var(--reel-paper);
	color: var(--reel-ink);
	font-family: var(--reel-font-body);
}

/* Ссылка «к содержимому» — видна только при навигации с клавиатуры */
.reel-skip {
	position: absolute;
	left: -9999px;
}

.reel-skip:focus {
	position: fixed;
	inset-block-start: 0.5rem;
	inset-inline-start: 0.5rem;
	left: auto;
	z-index: 10000;
	padding: 0.5rem 0.9rem;
	background: var(--reel-ink);
	color: var(--reel-paper);
}

.reel-header {
	background: var(--reel-paper);
	padding-block: 1.25rem;
}

.reel-header__inner,
.reel-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.reel-header__name {
	font-family: var(--reel-font-head);
	font-weight: 900;
	font-size: 1rem;
	letter-spacing: 0.01em;
	color: var(--reel-ink);
	text-decoration: none;
}

.reel-header__name:hover {
	color: var(--reel-accent);
}

.reel-footer {
	background: var(--reel-paper);
	color: var(--reel-muted);
	padding-block: 2rem;
	font-size: 0.875rem;
}

.reel-footer__name {
	font-family: var(--reel-font-head);
	font-weight: 700;
}

/* ---------- Переключатель языка ---------- */

.reel-langs {
	display: flex;
	gap: 0.25rem;
	font-family: var(--reel-font-head);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
}

.reel-langs__item {
	padding: 0.25rem 0.5rem;
	color: var(--reel-muted);
	border-radius: 4px;
	text-decoration: none;
}

.reel-langs__item:hover {
	color: var(--reel-ink);
}

.reel-langs__item.is-active {
	color: var(--reel-paper);
	background: var(--reel-ink);
}

/* ---------- Hero ---------- */

.reel-hero {
	padding-top: clamp(2rem, 6vw, 4.5rem);
}

.reel-hero__title {
	font-size: clamp(2.5rem, 7vw, 5.25rem);
	max-width: 20ch;
}

.reel-hero__subtitle {
	margin-top: 1.5rem;
	max-width: 58ch;
	font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
	color: var(--reel-muted);
}

.reel-hero__microline {
	margin-top: 1.5rem;
	font-size: 0.875rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--reel-muted);
}

/* Шоурил */

.reel-showreel {
	position: relative;
	display: block;
	width: 100%;
	margin-top: clamp(2.5rem, 5vw, 4rem);
	padding: 0;
	border: 0;
	background: var(--reel-surface);
	aspect-ratio: 16 / 9;
	overflow: hidden;
	cursor: pointer;
}

.reel-showreel__poster,
.reel-card__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.reel-showreel__placeholder,
.reel-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--reel-surface);
}

.reel-showreel__play,
.reel-card__play {
	position: absolute;
	display: grid;
	place-items: center;
	background: var(--reel-paper);
	color: var(--reel-ink);
	border-radius: 50%;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.reel-showreel__play {
	inset-block-start: 50%;
	inset-inline-start: 50%;
	transform: translate(-50%, -50%);
	width: 5rem;
	height: 5rem;
}

.reel-showreel:hover .reel-showreel__play {
	background: var(--reel-accent);
	color: var(--reel-paper);
	transform: translate(-50%, -50%) scale(1.06);
}

.reel-showreel__label {
	position: absolute;
	inset-block-end: 1rem;
	inset-inline-start: 1rem;
	font-family: var(--reel-font-head);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 1px 8px rgba(20, 17, 15, 0.55);
}

/* ---------- Фильтры ---------- */

.reel-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2.5rem;
}

.reel-filter {
	font-family: var(--reel-font-body);
	font-size: 0.9375rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--reel-line);
	border-radius: 999px;
	background: transparent;
	color: var(--reel-muted);
	cursor: pointer;
	transition: color 0.18s ease, border-color 0.18s ease;
}

.reel-filter:hover {
	color: var(--reel-ink);
	border-color: var(--reel-ink);
}

.reel-filter.is-active {
	color: var(--reel-paper);
	background: var(--reel-ink);
	border-color: var(--reel-ink);
}

/* ---------- Сетка работ ---------- */

.reel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
	gap: clamp(1.75rem, 3.5vw, 3rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.reel-card[hidden] {
	display: none;
}

.reel-card__media {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: var(--reel-surface);
	aspect-ratio: 16 / 9;
	overflow: hidden;
	cursor: pointer;
}

.reel-card__preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.reel-card__media.is-previewing .reel-card__preview {
	opacity: 1;
}

.reel-card__play {
	inset-block-end: 0.75rem;
	inset-inline-end: 0.75rem;
	width: 2.75rem;
	height: 2.75rem;
}

.reel-card__media:hover .reel-card__play {
	background: var(--reel-accent);
	color: var(--reel-paper);
}

.reel-card__body {
	padding-top: 1.125rem;
}

.reel-card__title {
	font-size: 1.25rem;
	font-weight: 700;
}

.reel-card__client {
	margin-top: 0.25rem;
	font-size: 0.9375rem;
	color: var(--reel-muted);
}

/* Ключевая цифра — главный визуальный акцент карточки.
   Есть у каждого ролика, поэтому задаёт ритм всей сетке. */
.reel-card__metric {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--reel-line);
}

.reel-card__metric-value {
	font-family: var(--reel-font-head);
	font-weight: 900;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--reel-accent);
}

.reel-card__metric-label {
	font-size: 0.875rem;
	color: var(--reel-muted);
	line-height: 1.35;
}

.reel-card__roles {
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--reel-muted);
}

/* ---------- About ---------- */

.reel-about {
	background: var(--reel-surface);
}

.reel-about__inner {
	display: grid;
	gap: clamp(2rem, 5vw, 4rem);
	grid-template-columns: 1fr;
	align-items: start;
}

@media (min-width: 62rem) {
	.reel-about__inner {
		grid-template-columns: 1.4fr 1fr;
	}
}

/* Выносная цитата — самая человечная строка на сайте */
.reel-quote {
	margin: 0 0 2.5rem;
	padding: 0;
	border: 0;
	font-family: var(--reel-font-head);
	font-weight: 500;
	font-size: clamp(1.375rem, 2.8vw, 2rem);
	line-height: 1.25;
	letter-spacing: -0.015em;
	max-width: 34ch;
	text-wrap: balance;
}

.reel-quote::before {
	content: '\201C';
	color: var(--reel-accent);
}

.reel-quote::after {
	content: '\201D';
	color: var(--reel-accent);
}

.reel-credential {
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--reel-line);
	font-family: var(--reel-font-head);
	font-weight: 700;
	font-size: 0.9375rem;
	letter-spacing: 0.02em;
}

.reel-about__photo img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- Path (шкала развития) ---------- */

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

.reel-timeline__item {
	position: relative;
	padding: 1.75rem 0 1.75rem 2rem;
	border-top: 1px solid var(--reel-line);
}

.reel-timeline__item:last-child {
	border-bottom: 1px solid var(--reel-line);
}

/* Точка на линии — маршрут читается как последовательность */
.reel-timeline__item::before {
	content: '';
	position: absolute;
	inset-block-start: 2.4rem;
	inset-inline-start: 0;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--reel-accent);
}

.reel-timeline__period {
	font-family: var(--reel-font-head);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--reel-muted);
}

.reel-timeline__title {
	margin-top: 0.35rem;
	font-size: clamp(1.25rem, 2.2vw, 1.625rem);
}

.reel-timeline__gained {
	margin-top: 0.5rem;
	font-family: var(--reel-font-head);
	font-weight: 700;
	font-size: 1rem;
	color: var(--reel-accent);
}

.reel-timeline__text {
	margin-top: 0.5rem;
	max-width: 62ch;
	color: var(--reel-muted);
}

@media (min-width: 62rem) {
	.reel-timeline__item {
		display: grid;
		grid-template-columns: 12rem 1fr;
		gap: 2rem;
		align-items: start;
	}

	.reel-timeline__period {
		padding-top: 0.4rem;
	}
}

/* ---------- Craft ---------- */

.reel-craft__inner {
	display: grid;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	grid-template-columns: 1fr;
}

@media (min-width: 62rem) {
	.reel-craft__inner {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

.reel-craft__title {
	font-size: clamp(2rem, 4.5vw, 3.25rem);
	max-width: 18ch;
}

.reel-craft__influences {
	margin-top: 1.5rem;
	font-family: var(--reel-font-head);
	font-weight: 500;
	font-size: 1.125rem;
	line-height: 1.45;
	max-width: 42ch;
}

.reel-craft__ai {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--reel-line);
	font-size: 0.9375rem;
	color: var(--reel-muted);
	max-width: 46ch;
}

/* ---------- Approach ---------- */

.reel-approach {
	background: var(--reel-surface);
}

/* ---------- Contact ---------- */

.reel-contact {
	border-top: 1px solid var(--reel-line);
	text-align: center;
}

.reel-contact__title {
	font-size: clamp(2rem, 5vw, 3.5rem);
	max-width: 24ch;
	margin-inline: auto;
}

.reel-contact__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 2rem;
}

.reel-btn {
	display: inline-block;
	padding: 0.85rem 1.6rem;
	font-family: var(--reel-font-head);
	font-weight: 700;
	font-size: 1rem;
	border: 1px solid var(--reel-ink);
	border-radius: 999px;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.reel-btn--primary {
	background: var(--reel-ink);
	color: var(--reel-paper);
}

.reel-btn--primary:hover {
	background: var(--reel-accent);
	border-color: var(--reel-accent);
	color: var(--reel-paper);
}

.reel-btn--ghost {
	color: var(--reel-ink);
}

.reel-btn--ghost:hover {
	background: var(--reel-ink);
	color: var(--reel-paper);
}

.reel .reel-btn:hover {
	border-bottom-color: currentColor;
}

.reel-contact__location {
	margin-top: 1.5rem;
	font-size: 0.9375rem;
	color: var(--reel-muted);
}

.reel-socials {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.25rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
}

.reel-socials a {
	color: var(--reel-muted);
}

.reel-socials a:hover {
	color: var(--reel-accent);
}

/* ---------- Модальное окно плеера ---------- */

.reel-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: clamp(1rem, 4vw, 3rem);
}

.reel-modal[hidden] {
	display: none;
}

.reel-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 17, 15, 0.92);
	border: 0;
}

.reel-modal__inner {
	position: relative;
	width: 100%;
	max-width: 68rem;
}

.reel-modal__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
}

.reel-modal__frame iframe,
.reel-modal__frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.reel-modal__close {
	position: absolute;
	inset-block-end: calc(100% + 0.5rem);
	inset-inline-end: 0;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1.75rem;
	line-height: 1;
	color: #fff;
	background: transparent;
	border: 0;
	cursor: pointer;
}

/* ---------- Доступность ---------- */

.reel :focus-visible {
	outline: 2px solid var(--reel-accent);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.reel * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
