/* ==========================================================
   HK PHOTO 2.0
   Main Stylesheet

   Author: Helmut Kuhn
   Version: 2.0

   TABLE OF CONTENTS

   01 RESET
   02 ROOT VARIABLES
   03 GLOBAL ELEMENTS
   04 TYPOGRAPHY
   05 SITE LAYOUT
   06 HEADER & NAVIGATION
   07 PAGE CONTENT & GALLERY
   08 HOME SLIDESHOW
   09 GRID VIDEO
   10 VIMEO PLAYER
   11 LIGHTBOX
   12 FOOTER
   13 RESPONSIVE
   ========================================================== */

/* ==========================================================
   01 RESET
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; }


/* ==========================================================
02 ROOT VARIABLES
========================================================== */ 

:root {
	--hk-bg: #101010;
	--hk-text: #f2f2f2;
	--hk-muted: #a8a8a8;
	--hk-soft: #6f6f6f;
	--hk-max-width: 1680px;
	--hk-page-pad: clamp(18px, 4vw, 56px);
	--hk-transition: 360ms ease;
}

/* ==========================================================
03 GLOBAL ELEMENTS
========================================================== */

html {
	background: var(--hk-bg);
	color: var(--hk-text);
}

body {
	min-height: 100vh;
	background: var(--hk-bg);
	color: var(--hk-text);
	font-family: Inter, Avenir Next, Helvetica Neue, Helvetica, Arial, sans-serif;
	font-weight: 300;
}

.site-shell {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-main {
	flex: 1 0 auto;
}

.empty-state {
	color: var(--hk-muted);
	text-align: center;
	padding: 8vh var(--hk-page-pad);
	font-size: 14px;
	letter-spacing: .08em;
	text-transform: uppercase;
}


/* ==========================================================
   04 TYPOGRAPHY
   ========================================================== */


.text-page {
	max-width: 860px;
	font-size: 17px;
	line-height: 1.75;
	color: #ddd;
}

.page-content p {
	margin: 0 0 1.2em;
}

.page-content a {
	border-bottom: 1px solid rgba(255,255,255,.35);
}

/* ==========================================================
   05 SITE LAYOUT
   ========================================================== */

/* ==========================================================
   06 HEADER & NAVIGATION
   ========================================================== */

.site-header {
	padding: 38px var(--hk-page-pad) 16px;
	text-align: center;
}

.site-title {
	display: inline-block;
	font-size: clamp(22px, 2.1vw, 36px);
	letter-spacing: .22em;
	line-height: 1.2;
	font-weight: 300;
}

.site-menu {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px 26px;
	padding: 0 var(--hk-page-pad) 28px;
}

.site-menu-link {
	color: var(--hk-muted);
	font-size: 12px;
	letter-spacing: .18em;
	line-height: 1.4;
	text-transform: uppercase;
	transition: color var(--hk-transition);
}

.site-menu-link:hover,
.site-menu-link.is-active {
	color: var(--hk-text);
}

.page-heading {
	width: min(var(--hk-max-width), 100%);
	margin: 0 auto;
	padding: 0 var(--hk-page-pad) 28px;
	text-align: center;
	color: var(--hk-text);
	font-size: clamp(14px, 1.05vw, 18px);
	font-weight: 300;
	letter-spacing: .22em;
	line-height: 1.35;
	text-transform: uppercase;
}

.content-wrap {
	width: min(var(--hk-max-width), 100%);
	margin: 0 auto;
	padding: 0 var(--hk-page-pad) 70px;
}

.home-stage {
	width: min(var(--hk-max-width), 100%);
	margin: 0 auto;
	padding: 0 var(--hk-page-pad) 70px;
}

/* ==========================================================
   07 PAGE CONTENT & GALLERY
   ========================================================== */

.category-grid,
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--hk-grid-gap);
}

.category-grid {
	row-gap: calc(var(--hk-grid-gap) + 24px);
}

.category-card,
.gallery-tile {
	display: block;
	width: 100%;
	text-align: center;
}

.category-card .media-frame,
.gallery-tile .media-frame {
	transform: translateZ(0);
}

.category-card img,
.gallery-tile img {
	transition: transform var(--hk-transition), opacity var(--hk-transition);
}

.category-card:hover img,
.gallery-tile:hover img {
	transform: scale(1.025);
}

.category-title {
	display: block;
	padding-top: 12px;
	color: var(--hk-muted);
	font-size: 12px;
	letter-spacing: .18em;
	line-height: 1.5;
	text-transform: uppercase;
	transition: color var(--hk-transition);
}

.category-card:hover .category-title {
	color: var(--hk-text);
}

/* ==========================================================
   08 HOME SLIDESHOW
   ========================================================== */

.home-slideshow,
.home-hero,
.media-frame {
	display: block;
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #171717;
}

.home-hero img,
.media-frame img,
.media-frame video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-slideshow {
	position: relative;
}

.home-slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--hk-dissolve, 1200ms) ease;
}

.home-slide:first-child,
.home-slide.is-active {
	position: absolute;
}

.home-slide.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 2;
}

.home-slide[data-hk-lightbox] {
	cursor: pointer;
}

.home-slide-poster,
.home-video-holder,
.home-video-holder iframe {
	width: 100%;
	height: 100%;
}

.home-slide-poster,
.home-video-holder iframe {
	display: block;
}

.home-slide-poster {
	position: relative;
	z-index: 1;
	object-fit: cover;
}

.home-video-holder {
	position: absolute;
	inset: 0;
	z-index: 2;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	transition: opacity var(--hk-dissolve, 1200ms) ease;
}

.home-video-holder.is-ready {
	opacity: 1;
}

.home-slide:has(.home-video-holder.is-ready) .home-slide-poster {
	opacity: 0;
}

.home-video-holder iframe {
	position: absolute;
	inset: 0;
	border: 0;
}

/* ==========================================================
   09 GRID VIDEO
   ========================================================== */

.grid-video-holder,
.grid-video-holder iframe {
	width: 100%;
	height: 100%;
}

.grid-video-holder iframe {
	display: block;
}

.grid-video-holder {
	position: absolute;
	inset: 0;
	z-index: 2;
	opacity: 0;
	transition: opacity var(--hk-transition);
	pointer-events: none;
}

.grid-video-holder.is-ready {
	opacity: 1;
}

.media-frame > img {
	transition: opacity var(--hk-transition);
}

.media-frame:has(.grid-video-holder.is-ready) > img {
	opacity: 0;
}

.grid-video-holder iframe {
	border: 0;
}

.media-frame {
	position: relative;
}

/* ==========================================================
   10 VIMEO PLAYER
   ========================================================== */

/* V0.3.0 Vimeo iframe normalization. Vimeo creates this iframe. */
.home-video-holder iframe,
.grid-video-holder iframe {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	border: 0 !important;
}

/* ==========================================================
   11 LIGHTBOX
   ========================================================== */

/* V0.4.3 lightbox / presentation viewer */
.hk-lightbox-open {
	overflow: hidden;
}

.hk-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	grid-template-columns: 110px minmax(0, 1fr) 110px;
	grid-template-rows: 100%;
	background: #000;
	color: var(--hk-muted);
}

.hk-lightbox.is-open {
	display: grid;
}

.hk-lightbox-side {
	position: relative;
	z-index: 10001;
	background: #000;
}

.hk-lightbox-stage {
	position: relative;
	min-width: 0;
	width: 100%;
	height: 100%;
	background: #000;
	padding: 10px 0 20px;
	overflow: hidden;
}

.hk-lightbox-media {
	position: absolute;
	inset: 10px 0 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
	opacity: 0;
	transition: opacity 1000ms ease;
}

.hk-lightbox-media.is-visible {
	opacity: 1;
}

.hk-lightbox-media img,
.hk-lightbox-video-wrap {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
}

.hk-lightbox-media img {
	object-fit: contain;
}

.hk-lightbox-video-wrap {
	position: relative;
	background: #000;
}

.hk-lightbox-video-poster,
.hk-lightbox-video,
.hk-lightbox-video iframe {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
}

.hk-lightbox-video-poster {
	z-index: 2;
	object-fit: contain;
	opacity: 1;
	transition: opacity 1000ms ease;
}

.hk-lightbox-video {
	z-index: 1;
	opacity: 0;
	transition: opacity 1000ms ease;
}

.hk-lightbox-video.is-ready {
	opacity: 1;
}

.hk-lightbox-video-wrap.is-video-ready .hk-lightbox-video-poster {
	opacity: 0;
}

.hk-lightbox-video iframe {
	border: 0 !important;
}

.hk-lightbox-close,
.hk-lightbox-prev,
.hk-lightbox-next,
.hk-lightbox-play,
.hk-lightbox-fullscreen {
	position: absolute;
	z-index: 10002;
	color: var(--hk-muted);
	font: inherit;
	line-height: 1;
	opacity: .72;
	transition: opacity var(--hk-transition), color var(--hk-transition);
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	-webkit-tap-highlight-color: transparent;
}

.hk-lightbox-close:hover,
.hk-lightbox-prev:hover,
.hk-lightbox-next:hover,
.hk-lightbox-play:hover,
.hk-lightbox-fullscreen:hover {
	color: var(--hk-text);
	opacity: 1;
}

.hk-lightbox button:focus,
.hk-lightbox button:focus-visible,
.hk-lightbox button:active {
	outline: 0 !important;
	box-shadow: none !important;
}

.hk-lightbox-close {
	top: 24px;
	right: 30px;
	font-size: 42px;
}

.hk-lightbox-fullscreen {
	top: 88px;
	right: 34px;
	font-size: 26px;
}

.hk-lightbox-play {
	top: 142px;
	right: 31px;
	min-width: 36px;
	font-size: 24px;
}

.hk-lightbox-prev,
.hk-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 64px;
	padding: 18px;
}

.hk-lightbox-prev { left: 12px; }
.hk-lightbox-next { right: 12px; }

.hk-lightbox.is-presentation {
	display: block;
	cursor: none;
}

.hk-lightbox.is-presentation .hk-lightbox-side,
.hk-lightbox.is-presentation .hk-lightbox-close,
.hk-lightbox.is-presentation .hk-lightbox-prev,
.hk-lightbox.is-presentation .hk-lightbox-next,
.hk-lightbox.is-presentation .hk-lightbox-play,
.hk-lightbox.is-presentation .hk-lightbox-fullscreen {
	display: none !important;
}

.hk-lightbox.is-presentation .hk-lightbox-stage {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	padding: 0;
}

.hk-lightbox.is-presentation .hk-lightbox-media {
	inset: 0;
}

.hk-lightbox.is-presentation .hk-lightbox-media,
.hk-lightbox.is-presentation .hk-lightbox-media img,
.hk-lightbox.is-presentation .hk-lightbox-video-wrap {
	width: 100vw;
	height: 100vh;
	max-width: 100vw;
	max-height: 100vh;
}

/* ==========================================================
   12 FOOTER
   ========================================================== */

.site-footer {
	flex: 0 0 auto;
	padding: 26px var(--hk-page-pad) 34px;
	text-align: center;
	color: var(--hk-soft);
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.footer-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin-bottom: 10px;
}

.footer-links a {
	transition: color var(--hk-transition);
}

.footer-links a:hover {
	color: var(--hk-text);
}




/* ==========================================================
   13 RESPONSIVE
   ========================================================== */

@media (max-width: 1000px) {
	.category-grid,
	.gallery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.site-header {
		padding-top: 28px;
	}

	.site-menu {
		gap: 10px 18px;
		padding-bottom: 30px;
	}

	.category-grid,
	.gallery-grid {
		grid-template-columns: 1fr;
		gap: var(--hk-grid-gap);
	}
}

@media (max-width: 700px) {
	.hk-lightbox {
		grid-template-columns: 46px minmax(0, 1fr) 46px;
	}

	.hk-lightbox-stage {
		padding: 10px 0 20px;
	}

	.hk-lightbox-prev,
	.hk-lightbox-next {
		font-size: 42px;
		padding: 8px;
	}

	.hk-lightbox-close {
		right: 9px;
		font-size: 34px;
	}

	.hk-lightbox-fullscreen {
		top: 76px;
		right: 12px;
		font-size: 22px;
	}

	.hk-lightbox-play {
		top: 126px;
		right: 11px;
		font-size: 20px;
	}
}