/* Ивленд – the only stylesheet of the site (home page and gallery pages).
   Third-party: Font Awesome icons (icons.css, a 15-icon subset), Source Sans Pro (Google Fonts)
   and nanogallery2 (nanogallery2.min.css). Everything else is here.

   The home page keeps the proportions of the design it replaced: everything is sized in rem and
   the root font size follows the window width (see "home page" below). */

:root {
	--text: #555;
	--strong: #000;
	--line: rgba(0, 0, 0, 0.12);
	--dark: #242629;
	--darker: #1f2224;
}

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

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

body {
	margin: 0;
	font: 300 1.125rem/1.75 "Source Sans Pro", Helvetica, sans-serif;
	color: var(--text);
	background: #fff;
}

img {
	max-width: 100%;
}

a {
	color: var(--strong);
	text-decoration: none;
	border-bottom: 1px dotted rgba(0, 0, 0, 0.4);
}

a:hover {
	border-bottom-color: transparent;
}

b,
strong {
	font-weight: 400;
	color: var(--strong);
}

h1,
h2,
h3 {
	margin: 0 0 1rem;
	font-weight: 300;
	line-height: 1.2;
	color: var(--strong);
}

h2 {
	font-size: 2.75rem;
}

h3 {
	font-size: 1.4rem;
}

p {
	margin: 0 0 1.5rem;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Font Awesome icon in front of the label: <a class="button icon fa-phone"> */
.icon::before {
	display: inline-block;
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	font-style: normal;
	line-height: 1;
}

/* ---------- home page ---------- */

/* The root font size follows the window, like the original design: all rem sizes below scale with it. */
html.home { font-size: 18pt; }
@media (max-width: 1680px) { html.home { font-size: 14pt; } }
@media (max-width: 1280px) { html.home { font-size: 12pt; } }
@media (max-width: 736px) { html.home { font-size: 11pt; } }
@media (max-width: 360px) { html.home { font-size: 10pt; } }

.home body {
	font-size: 1rem;
	line-height: 1.65;
	color: #000;
}

.home h1,
.home h2,
.home h3 {
	margin: 0 0 1rem;
	line-height: 1.375;
	letter-spacing: -0.05em;
}

.home h2 { font-size: 2.25rem; }
.home h3 { font-size: 1.5rem; }
.home p { margin: 0 0 2rem; }

.home a {
	border: 0;
	text-decoration: underline;
}

.home a:hover {
	text-decoration: none;
}

.home a:not(.button):hover {
	color: #47d3e5;
}

/* buttons: pill, 0.75rem uppercase label, 3.75em high, at most 20rem wide */
.home .button {
	display: inline-block;
	font-family: inherit;
	max-width: 20rem;
	height: 3.75em;
	padding: 0 2.5em;
	border: 0;
	border-radius: 3.75em;
	background: transparent;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
	color: #000;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 3.75em;
	letter-spacing: 0.125em;
	text-align: center;
	text-decoration: none;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
}

.home .button:hover {
	box-shadow: inset 0 0 0 1px #000;
}

.home .button.primary {
	background: #000;
	box-shadow: none;
	color: #fff;
}

.home .button.primary:hover {
	background: #333;
}

.home .button.small {
	height: 3.325em;
	padding: 0 2em;
	border-radius: 3.325em;
	font-size: 0.6rem;
	line-height: 3.325em;
}

.home .button.disabled {
	opacity: 0.25;
	pointer-events: none;
}

.home .button.icon::before {
	margin-right: 0.5rem;
	line-height: inherit;
}

/* stacked buttons: one per row, as wide as allowed (max 20rem) */
.home .actions {
	display: flex;
	flex-direction: column;
	margin: 0 0 2rem;
	list-style: none;
}

.home .actions li {
	padding: 1.3rem 0 0;
}

.home .actions li:first-child {
	padding-top: 0;
}

.home .actions .button {
	width: 100%;
}

/* hero: text column on the left, photo filling the right half, at least a full screen high */
.hero,
.split {
	position: relative;
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	align-items: stretch;
	overflow-x: hidden;
}

.hero {
	min-height: 100vh;
	text-align: center;
}

.hero .content {
	align-self: center;
	flex: 1 1 auto;
	width: 50%;
	max-width: 48rem;
	margin: 0 auto;
	padding: 7rem 7rem 5rem;
}

.hero .image {
	flex: 0 0 auto;
	width: 50%;
}

/* About and gallery sections: wide text column and a photo on the left */
.split {
	flex-direction: row-reverse;
	text-align: left;
}

.split .content {
	align-self: center;
	flex: 1 1 auto;
	width: 65%;
	max-width: 64rem;
	margin: 0 auto;
	padding: 7rem 7rem 5rem;
}

.split .image {
	flex: 0 0 auto;
	width: 35%;
	min-width: 25rem;
}

.hero .image,
.split .image {
	position: relative;
	overflow: hidden;
}

.hero .image img,
.split .image img {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.hero .image img {
	object-position: right;
}

.logo {
	width: 25%;
	margin: auto;
	padding-bottom: 1rem;
}

/* centered sections: a 64rem column of text, galleries inside run edge to edge */
.center {
	text-align: center;
}

.center > .inner {
	width: 64rem;
	max-width: 100%;
	margin: 0 auto;
	padding: 7rem 3.5rem 5rem;
}

/* "back to top" button row */
.back {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	position: relative;
	margin: 3rem 0;
}

.back > * {
	flex: 0 0 auto;
	width: 33.33333%;
	padding: 2.1875rem 2.1875rem 0.1875rem;
}

/* contacts and partners: two columns, the odd one centered below */
.cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	position: relative;
	margin: 3rem 0;
}

.cards > * {
	flex: 0 0 auto;
	width: 50%;
	padding: 1.75rem 1.75rem 0.1rem;
}

.badge {
	display: block;
	margin: 0 0 1rem;
}

.badge::before {
	display: inline-block;
	width: 2.75em;
	height: 2.75em;
	margin: 0;
	border-radius: 2.75em;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
	font-size: 1.25rem;
	line-height: 2.75em;
}

.cards address {
	font-style: normal;
	margin: 0 0 1.5rem;
}

/* footer: one small line, right-aligned */
footer.center > .inner {
	width: 100%;
	max-width: none;
	padding: 1.5rem 3rem 2rem;
	text-align: right;
}

footer.center p {
	margin: 0;
	font-size: 0.7rem;
}

/* faint line between the sections */
.home body > section + section,
.home body > section + footer {
	box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.075);
}

/* galleries inside the home page run edge to edge */
.home [data-nanogallery2] {
	margin: 0;
}

@media (max-width: 1680px) {
	.hero .content,
	.split .content { padding: 5rem 5rem 3rem; }
	.center > .inner { padding: 5rem 2.5rem 3rem; }
}

@media (max-width: 1280px) {
	.hero .content,
	.split .content { padding: 4rem 4rem 2rem; }
	.center > .inner { padding: 4rem 4rem 2rem; }
}

@media (max-width: 980px) {
	.hero .content,
	.split .content { padding: 3.75rem 3rem 1.75rem; }
	.split .content,
	.split .image { width: 50%; min-width: 0; }
	.center > .inner { padding: 4.5rem 3rem 2.5rem; }
	.back > * { width: 50%; padding: 3.5rem 3.5rem 1.5rem; }
	.cards > * { padding: 1.75rem 1.75rem 0.1rem; }
}

@media (max-width: 736px) {
	footer.center > .inner { padding: 1.25rem 1.5rem 1.5rem; }

	.home h1 { font-size: 2.5rem; }
	.home h2 { font-size: 2rem; }
	.home h3 { font-size: 1.25rem; }

	.hero .content,
	.split .content { padding: 2.5rem 2rem 0.5rem; }
	.center > .inner { padding: 3rem 2rem 1rem; }
	.cards { margin: 2rem 0; }
}

/* hero on portrait screens and phones: photo on top, text below */
@media (max-width: 736px), (orientation: portrait) {
	.hero {
		flex-direction: column-reverse;
	}

	.hero .content {
		display: flex;
		flex-direction: column;
		justify-content: center;
		width: 100%;
		max-width: 100%;
		min-height: 50vh;
	}

	.hero .image {
		width: 100%;
		max-width: 100%;
		height: 50vh;
	}
}

/* About / gallery sections on phones: photo on top at its own proportions, text centered below */
@media (max-width: 736px) {
	.split {
		flex-direction: column-reverse;
		text-align: center;
	}

	.split .content,
	.split .image {
		width: 100%;
		max-width: 100%;
	}

	.split .image {
		min-width: 0;
		height: auto;
	}

	.split .image img {
		position: relative;
	}
}

@media (max-width: 480px) {
	html.home,
	.home body { min-width: 320px; }

	.home .actions li {
		width: 100%;
		padding: 1rem 0 0;
		text-align: center;
	}

	.home .actions li:first-child { padding-top: 0; }
	.home .actions .button.icon::before { margin-left: -0.5rem; }

	.back > *,
	.cards > * {
		width: 100%;
		padding: 2.625rem 0 0.625rem;
	}

	.cards > * { padding-top: 1.3125rem; padding-bottom: 0.1rem; }
	.cards > :first-child,
	.back > :first-child { padding-top: 0; }
	.cards > :last-child,
	.back > :last-child { padding-bottom: 0; }
	.cards > :last-child > .inner > :last-child { margin-bottom: 0; }
}

/* ---------- gallery pages ---------- */

/* Sizes follow the dark design these pages replaced: everything in em, the body font follows the window. */
body.gallery-page {
	padding: 0 0 4em;
	background: #242629;
	color: #a0a0a1;
	font-size: 15pt;
	font-weight: 300;
	letter-spacing: 0.025em;
	line-height: 1.65;
}

@media (max-width: 1680px) {
	body.gallery-page { font-size: 11pt; }
}

.gallery-page strong {
	color: #fff;
	font-weight: 300;
}

/* title bar, fixed at the bottom */
.gallery-header {
	position: fixed;
	left: 0;
	bottom: -1em;
	z-index: 10002; /* above the thumbnails; the viewer (10003) covers it */
	width: 100%;
	height: 5em;
	padding: 0 1.5em;
	background: #1f2224;
	line-height: 4em;
	user-select: none;
}

.gallery-header h1 {
	display: inline-block;
	margin: 0;
	color: #a0a0a1;
	font-size: 1em;
	font-weight: 300;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	vertical-align: middle;
}

.gallery-header nav {
	position: absolute;
	right: 0;
	top: 0;
}

.gallery-header nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gallery-header nav li {
	display: inline-block;
	padding: 0;
}

/* square button with a 2px ring; the icon floats to the right of the label */
.gallery-page .button {
	display: inline-block;
	height: 3.05556em;
	padding: 0 2.5em;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	box-shadow: inset 0 0 0 2px #36383c;
	color: #fff;
	font-size: 0.9em;
	font-weight: 300;
	letter-spacing: 0.1em;
	line-height: 3.05556em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, color 0.2s ease-in-out;
}

.gallery-page .button:hover {
	box-shadow: inset 0 0 0 2px #34a58e;
	color: #34a58e;
}

.gallery-page .button.icon {
	padding-left: 1.35em;
}

.gallery-page .button.icon::before {
	margin-right: 0.5em;
	line-height: inherit;
}

.gallery-page .gallery-header nav a.button {
	padding: 0 1.65em;
}

.gallery-header nav a.icon::before {
	float: right;
	margin-left: 0.75em;
	color: #505051;
}

.gallery-header nav a:hover {
	color: #fff;
}

#gallery-main {
	padding: 0 0 7em; /* room for the fixed bar */
}

#gallery-main [data-nanogallery2] {
	margin: 0;
}

/* close button (cross) in the top-right corner; Esc does the same, see gallery-close.js */
.gallery-close {
	position: fixed;
	top: 0.5rem;
	right: 0.5rem;
	width: 3rem;
	height: 3rem;
	/* above the title bar on phones; the viewer (10003) comes later in the page, so it stays on top */
	z-index: 10003;
	border: 0;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.55);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 1.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5L5 19'/%3E%3C/svg%3E");
	transition: background-color 0.2s ease;
}

.gallery-close:hover,
.gallery-close:focus-visible {
	background-color: rgba(0, 0, 0, 0.85);
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* phones: the title bar moves to the top; its link would sit under the cross and goes to the same place */
@media (max-width: 736px) {
	body.gallery-page {
		padding: 4em 0 0;
	}

	.gallery-header {
		bottom: auto;
		top: 0;
		height: 4em;
		padding: 0 1em;
	}

	.gallery-header h1 {
		font-size: 0.9em;
	}

	.gallery-header nav {
		display: none;
	}

}

/* ---------- nanogallery2 thumbnails: hover / keyboard-focus indication ---------- */

#gallery [data-a11y]:not(.nGY2GThumbnail):focus-visible,
.nGY2Viewer [data-a11y]:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.nGY2GThumbnail {
	cursor: pointer;
}

/* white inset border, slight dark tint and an "eye" icon that says "click to view" */
.nGY2GThumbnail::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 5;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
	box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px rgba(0, 0, 0, 0.35);
	background-color: rgba(0, 0, 0, 0.25);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 48px 48px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7.5 11-7.5S23 12 23 12s-4 7.5-11 7.5S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3C/svg%3E");
}

.nGY2GThumbnail:hover::after,
.nGY2GThumbnail:focus-visible::after {
	opacity: 1;
}

.nGY2GThumbnail:focus-visible {
	outline: none; /* the border above replaces the default outline */
}

@media (hover: none) {
	/* touch screens have no hover: keep the page clean */
	.nGY2GThumbnail:hover::after {
		opacity: 0;
	}
}
