/*
Theme Name: Videographer
Description: Кинематографическое портфолио с локальными обложками и видеоработами.
Version: 1.2.1
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: videographer
*/
@font-face {
	font-family: Manrope;
	src: url("assets/fonts/manrope-variable.ttf") format("truetype");
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
}

:root {
	color-scheme: dark;
	--bg: #0d0d0d;
	--surface: #141414;
	--ink: #f2f2f2;
	--muted: #a1a19e;
	--line: #262626;
	--shade: rgba(0, 0, 0, .55);
	--edge: clamp(22px, 3.4vw, 60px);
	--gallery-edge: clamp(12px, 1.8vw, 40px);
	--gap: clamp(8px, .85vw, 16px);
	--transition: 300ms ease;
}

* {
	box-sizing: border-box;
}

html {
	background: var(--bg);
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--ink);
	font: 400 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

main {
	flex: 1 0 auto;
	min-width: 0;
}

h1,
h2,
p,
figure,
ul,
dl,
dd {
	margin: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	color: inherit;
	background: none;
	font: inherit;
	cursor: pointer;
}

img,
video {
	display: block;
	max-width: 100%;
}

:focus-visible {
	outline: 2px solid white;
	outline-offset: 3px;
}

.screen-reader-text,
.skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed;
	z-index: 5;
	left: 12px;
	top: 12px;
	background: var(--bg);
	padding: 10px;
}

.masthead,
.site-footer,
.contact-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-inline: var(--edge);
}

.masthead {
	min-height: 84px;
	padding-block: 16px;
}

.signature {
	display: grid;
	width: fit-content;
	gap: 3px;
	text-transform: uppercase;
	line-height: 1.25;
}

.signature strong {
	font-size: clamp(13px, 1.2vw, 19px);
	font-weight: 550;
	letter-spacing: .18em;
}

.signature span,
.eyebrow,
.nav-links,
.text-link,
.site-footer,
.motion-control,
.player-bar {
	font-size: 10px;
	font-weight: 550;
	letter-spacing: .19em;
	text-transform: uppercase;
}

.signature span {
	font-size: 9px;
	letter-spacing: .29em;
	color: var(--muted);
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(16px, 3vw, 48px);
	padding: 0;
	list-style: none;
}

.nav-links a {
	display: block;
	padding-block: 11px;
	color: var(--muted);
	transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links [aria-current],
.current-menu-item>a {
	color: var(--ink);
}

.project-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gap);
	padding: var(--gap) var(--gallery-edge) 0;
}

.project-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	justify-content: center;
	padding: 24px var(--gallery-edge);
}

.project-card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	aspect-ratio: 2.48;
	background: var(--surface);
	--position: center;
	
}

.project-card.featured {
	aspect-ratio: auto;
	height: clamp(350px, 58vh, 760px);
}

.project-grid> :last-child:nth-child(odd) {
	grid-column: 1 / -1;
	aspect-ratio: 5.2;
}

.position-top {
	--position: top;
}

.position-bottom {
	--position: bottom;
}

.position-left {
	--position: left;
}

.position-right {
	--position: right;
}

.cover,
.preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--position);
}

.preview:not(.playing) {
	opacity: 0;
}

.preview[hidden],
[hidden] {
	display: none;
}

.project-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: var(--shade);
	opacity: 0;
	transition: opacity var(--transition);
	pointer-events: none;
}

.caption {
	position: absolute;
	z-index: 4;
	left: clamp(20px, 2.4vw, 42px);
	bottom: clamp(18px, 2vw, 34px);
	right: var(--edge);
	color: white;
	opacity: 0;
	transition: opacity var(--transition);
	pointer-events: none;
}

.caption h2 {
	font-size: clamp(15px, 1.45vw, 24px);
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: .31em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.caption .eyebrow {
	margin-bottom: 8px;
	font-size: 9px;
	letter-spacing: .23em;
}

.caption a {
	pointer-events: auto;
}

.caption a:hover,
.caption a:focus-visible {
	text-decoration: underline;
	text-underline-offset: .15em;
}

.featured .caption {
	left: calc(var(--edge) + .8vw);
	bottom: 14%;
}

.featured h2 {
	font-size: clamp(30px, 3vw, 56px);
	letter-spacing: .35em;
}

.featured .eyebrow {
	margin-bottom: 16px;
}

.project-card:not(.has-film) .caption,
.project-card:focus-within .caption,
.project-card:focus-within::after {
	opacity: 1;
}

.film-link {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: grid;
	place-content: center;
}

.film-link:focus-visible {
	outline-offset: -4px;
}

.play-icon {
	opacity: 0;
	transition: opacity var(--transition);
	color: white;
}

.film-link:focus-visible .play-icon {
	opacity: 1;
}

@media (hover: hover) {

	.project-card:not(.study):hover::after,
	.project-card:hover .caption,
	.film-link:hover .play-icon {
		opacity: 1;
	}
}

.contact-strip {
	min-height: 132px;
	padding-block: 30px;
}

.contact-strip p {
	font-size: clamp(20px, 2vw, 32px);
	font-weight: 400;
	letter-spacing: .025em;
}

.text-link {
	display: inline-flex;
	align-items: center;
	gap: 15px;
	padding-block: 8px;
	border-bottom: 1px solid currentColor;
}

.text-link span {
	font-size: 17px;
	line-height: 1;
}

.site-footer {
	flex-wrap: wrap;
	border-top: 1px solid var(--line);
	padding-block: 24px;
	font-size: 9px;
	color: var(--muted);
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
}

.footer-links a:hover {
	color: var(--ink);
}

.about-page {
	--about-edge: clamp(22px, 4.65vw, 96px);
}

.about-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	align-content: center;
	min-height: clamp(280px, 19.7vw, 480px);
	padding: 36px var(--about-edge);
	background: #121414;
}

.about-portrait {
	position: absolute;
	z-index: -2;
	top: 0;
	left: 28%;
	width: 80%;
	height: 100%;
	object-fit: cover;
	object-position: center 72%;
	mask-image: linear-gradient(to right, transparent, black 28%);
}

.about-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, transparent 20%, rgb(0 0 0 / 32%) 62%, rgb(0 0 0 / 22%));
}

.about-identity {
	max-width: 48%;
	overflow-wrap: anywhere;
}

.about-identity .eyebrow {
	display: flex;
	align-items: center;
	gap: 20px;
}

.about-identity .eyebrow::after {
	content: "";
	width: clamp(44px, 4.5vw, 84px);
	height: 1px;
	background: #737373;
}

.about-identity h1 {
	max-width: 10em;
	margin-block: .42em .56em;
	font-size: clamp(34px, 2.65vw, 64px);
	line-height: 1.17;
	font-weight: 700;
	letter-spacing: .32em;
	text-transform: uppercase;
}

.about-role {
	font-size: clamp(10px, .7vw, 14px);
	font-weight: 600;
	letter-spacing: .27em;
	text-transform: uppercase;
	color: #d2d2d0;
}

.about-intro {
	display: grid;
	grid-template-columns: minmax(0, .81fr) minmax(0, 1fr);
	align-items: center;
	column-gap: clamp(32px, 5.8vw, 110px);
	padding: clamp(32px, 2.25vw, 54px) var(--about-edge);
}

.about-intro > :only-child {
	grid-column: 1 / -1;
}

.about-intro .about-bio,
.about-intro .about-services {
	font-family: Manrope, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-weight: 400;
}

.about-intro .about-bio {
	max-width: none;
	padding-right: clamp(28px, 4.5vw, 88px);
	border-right: 1px solid #393939;
	font-size: clamp(16px, 1vw, 21px);
	line-height: 1.5;
}

.editor-copy,
.contact-list {
	overflow-wrap: anywhere;
}

.contact-page h1,
.text-page h1 {
	margin: 10px 0 28px;
	font-size: clamp(24px, 2.3vw, 46px);
	line-height: 1.28;
	letter-spacing: .15em;
	text-transform: uppercase;
	font-weight: 400;
}

.editor-copy {
	max-width: 64ch;
}

.project-page article {
	display: grid;
	gap: 24px;
	justify-items: start;
	overflow-wrap: anywhere;
}

.project-page h1 {
	margin-block: 8px 0;
}

.project-media {
	width: 100%;
}

.project-media :is(img, video) {
	width: 100%;
	height: auto;
	max-height: 78vh;
	object-fit: contain;
	background: var(--surface);
}

.project-media figcaption {
	margin-top: 8px;
}

.editor-copy p+p {
	margin-top: 1em;
}

.about-intro .about-services h2 {
	font-weight: 700;
}

.about-services ol {
	margin: 8px 0 0;
	padding-left: 0;
	list-style: none;
	counter-reset: service;
}

.about-services li {
	display: grid;
	grid-template-columns: clamp(36px, 4vw, 78px) minmax(0, 1fr);
	align-items: baseline;
	padding-block: .47em;
	counter-increment: service;
	line-height: 1.5;
}

.about-services li::before {
	content: counter(service, decimal-leading-zero);
	font-size: 1.15em;
	font-weight: 600;
	letter-spacing: .12em;
	color: var(--muted);
}

.about-services li + li {
	border-top: 1px solid var(--line);
}

.editor-copy a,
.playback-error a {
	text-decoration: underline;
}

.about-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
	margin-inline: var(--about-edge);
	padding: 28px 0;
	border-top: 1px solid var(--line);
	align-items: start;
}

.about-details p {
	margin-top: 12px;
	color: var(--muted);
	white-space: pre-line;
}

.about-banner {
	background-color: var(--surface);
	background-image: linear-gradient(rgb(0 0 0 / 60%), rgb(0 0 0 / 60%)), url("assets/images/about-banner.webp");
	background-position: center;
	background-size: cover;
}

.about-banner .contact-strip {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-content: center;
	align-items: baseline;
	gap: clamp(12px, 2vw, 24px);
	min-height: clamp(88px, 5.8vw, 130px);
	padding: 22px var(--about-edge);
}

.about-banner .contact-strip p {
	font-size: clamp(18px, 1.4vw, 32px);
	letter-spacing: .13em;
	text-transform: uppercase;
}

.about-banner .text-link {
	gap: clamp(8px, 2vw, 15px);
	color: #fff;
	font-size: clamp(12px, 1vw, 14px);
	font-weight: 600;
	border: 0;
}

.about-banner .text-link:hover {
	text-decoration: underline;
	text-underline-offset: .4em;
}

@media (max-width: 800px) {
	.about-intro {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 28px;
	}

	.about-intro .about-bio {
		border-right: 0;
		padding-right: 0;
	}
}

.contact-page,
.text-page,
.empty-state {
	padding: clamp(58px, 11vh, 140px) var(--edge);
}

.contact-empty,
.contact-list dt {
	color: var(--muted);
}

.contact-list {
	max-width: 640px;
	margin-top: 38px;
}

.contact-list>div {
	padding: 18px 0;
	border-top: 1px solid var(--line);
}

.contact-list dd {
	margin-top: 4px;
	font-size: clamp(18px, 2vw, 30px);
}

.motion-control,
.player-bar button {
	padding: 8px 12px;
	border: 1px solid var(--muted);
}

.motion-control {
	margin: 16px var(--gallery-edge) 0;
}

body.player-open {
	overflow: hidden;
}

.player-dialog {
	width: min(1100px, 94vw);
	padding: 0;
	border: 0;
	background: var(--bg);
	color: var(--ink);
}

.player-dialog::backdrop {
	background: rgba(0, 0, 0, .93);
}

.player-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px;
}

.player-bar h2 {
	font-size: 13px;
	overflow-wrap: anywhere;
}

.player-dialog video {
	width: 100%;
	max-height: 78vh;
}

.playback-error {
	padding: 12px;
}

@media (hover: none) {

	.caption,
	.play-icon {
		opacity: 1;
	}
}

@media (max-width: 680px) {
	.masthead {
		min-height: 72px;
		flex-wrap: wrap;
		gap: 4px 16px;
	}

	.nav-links {
		font-size: 9px;
		gap: 13px;
		letter-spacing: .12em;
	}

	.signature strong {
		font-size: 12px;
		letter-spacing: .1em;
	}

	.signature span {
		font-size: 8px;
	}

	.project-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.project-grid>.project-card,
	.project-grid> :last-child:nth-child(odd) {
		aspect-ratio: 2;
	}

	.project-card.featured {
		height: clamp(240px, 46svh, 460px);
	}

	.featured.study .cover {
		object-position: 63% center;
	}

	.caption,
	.play-icon {
		opacity: 1;
	}

	.featured .caption {
		left: var(--edge);
		bottom: 28px;
	}

	.contact-strip {
		min-height: 106px;
	}

	.about-hero {
		align-content: end;
		min-height: clamp(320px, 70vw, 430px);
		padding-top: 150px;
		padding-bottom: 24px;
	}

	.about-portrait {
		left: 0;
		width: 100%;
		object-position: 47% center;
		mask-image: none;
	}

	.about-hero::before {
		background: linear-gradient(0deg, #101212 0%, rgb(10 12 12 / 82%) 26%, transparent 69%);
	}

	.about-identity {
		max-width: 100%;
	}

	.about-banner .contact-strip {
		display: flex;
		flex-wrap: wrap;
	}

	.about-details {
		grid-template-columns: minmax(0, 1fr);
	}

	.site-footer {
		gap: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}


	*,
	*::before,
	*::after {
		transition-duration: 0s !important;
	}
}
