html, body {
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: rgb(17,17,17);
	font-family: 'Poppins', sans-serif;
	scroll-behavior: smooth;
}

/* 1.1 Rakenne: yläpalkki ja video */

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

header {
	font-size: calc(30px + 4.7vw);
	font-weight: 100;
	padding: 5vw;
	position: fixed;
	color: white;
	margin: 0;
	line-height: 100%;
	text-shadow: 0.03em 0.03em 0.1em black;
	transition: 0.4s;
	-webkit-transition: 0.4s;
	width: 100%;
	z-index: 5;
	box-sizing: border-box; /* testissä */
	height: auto;
	min-height: 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-direction: row;
}

.otsikko {
	display: flex;
	align-items: center;
	padding: 0 0 0 calc(10px + 0.5vw);
	animation: fadeIn 4s;
}

#nuolivihje {
	transition: opacity 5s ease-in;
	opacity: 0;
	position: fixed;
	left: calc(5.5vw + 10px);
	right: auto;
	bottom: 5vh;
	z-index: 1;
}

#nuolivihje img {
	height: 38vh;
	-webkit-filter: drop-shadow(0.2em 0.1em 0.35em #333333);
  filter: drop-shadow(0.2em 0.1em 0.35em #333333);
}

.nuolenPeitto {
	position: relative;
	background-color: rgb(17,17,17);
	z-index: 2;
}

nav {
	font-weight: 300;
	padding: 0 1vw 0 0;
	/*height: 3vw;*/
	height: 100%;
	display: none;
	align-items: center;
}

nav a {
	color: #FDF0CD;
}

nav span {
	color: white;
	padding: 0 1vw;
}

nav img {
	width: auto;
	/*width: 100%;*/
	/*height: 60%;*/
	min-height: 16px;
	max-height: 1.5vw;
	vertical-align: center;
}

.alkuvideo {
	grid-column-start: 1;
	grid-column-end: 4;
	overflow: hidden;
	height: 100vh;
	animation: fadeIn ease-in 6s;
}

.alkuvideo video {
	object-fit: cover;
	width: 100vw;
	height: 100vh;
}

.alkuvideo img {
	object-fit: cover;
	width: 100vw;
	height: 100vh;
}

/* Pudotuspainikkeen sisältämä listaelementti. */
.pudotus {
	display: inline-block;
	position: relative;
	height: 100%;
}

/* Navigaatiolinkkien ja pudotuspainikkeen muotoilu. */
.pudotusPainike {
	display: flex;
	padding: 0;
	background: transparent;
	align-items: center;
	height: 100%;
}

.pudotus:hover img {
	-webkit-filter: brightness(400%);
}

/* Laatikko joka putoaa esiin. Määrite "position: absolute"
on annettava, jotta laatikko sijoittuu täsmälleen
pudotuspainikkeen alapuolelle. */
.pudotusSisalto {
	display: none;
	position: absolute;
	/*ms-transform: translate(570%, 0);
	transform: translate(570%, 0);*/
	right: -1vw;
	background-image: linear-gradient(rgba(17,17,17,1), rgba(0,0,0,0.4));
	border: 1px solid #FDF0CD;
	box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
	z-index: 6;
	text-align: center;
	/*width: 4.3vw;*/
}

/* Ilmestyvän laatikon sisältämät linkit määritellään
block-elementeiksi, jotta ne järjestäytyisivät allekkain,
ja jotta niiden koko alue olisi klikattavissa. */
.pudotusSisalto a {
	display: block;
	color: #FDF0CD;
	padding: max(20px, 1vw) max(20px, 1.5vw);
}

.pudotusSisalto a:hover {
	color: white;
	text-shadow: 0 0 calc(0.07em + 0.01vw) white;
	background-color: rgba(250,250,250,0.15);
}

/* Laatikon näkyminen silloin, kun hiiren osoitin siirtyy
pudotuspainikkeen ylle. */
.pudotus:hover .pudotusSisalto {
	display: block;
}

/* 1.2 Rakenne: alkukuvat */

.alkukuvat {
	height: 50vh;
	border-top: 3px solid black;
	position: relative;
	overflow: hidden;
}

.alkukuvat div {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 4;
	text-align: left;
	height: 100%;
	width: 100%;
	opacity: 0.7;
}

.alkukuvat div p, .alkukuvat div ul {
	padding: 3vw 0 0 3vw;
	list-style-position: inside;
	margin: 0;
	font-weight: 200;
	color: white;
	-webkit-hyphens: manual;
  -ms-hyphens: manual;
  hyphens: manual;
	/*border: 1px solid red;*/
	width: 480px;
	/* pystykuva?! */
}

.alkukuvat a {
	position: absolute;
	left: 0;
	bottom: 0;
	padding: 0 0 3vw 3vw;
	font-weight: 500;
	color: white;
	opacity: 0.8;
	transition: 0.4s;
	-webkit-transition: 0.4s;
}

/* 1.3 Rakenne: yhteydenotto */

.yhteydenotto {
	/*min-height: 50vh;*/ /* lomakkeella */
	min-height: 0; /* yhteystiedoilla */
	border-top: 2px solid #FDF0CD;
	/*padding: 8vh 0 0 0;*/ /* lomakkeella */
	padding: 33vh 0 0 0; /* yhteystiedoilla */
	/*margin-bottom: 17vh;*/ /* lomakkeella */
	margin-bottom: 45vh; /* yhteystiedoilla */
	text-align: center;
}

/* Tämä määritys sivun versiolle, jossa ei ole lomaketta.*/

.yhteydenotto div {
	border: 1px solid #FDF0CD;
	display: inline-block;
	padding: calc(0.83em + 2.5vw);
}

/* Tämä määritys sivun versiolle, jossa ei ole lomaketta.*/

.yhteydenotto h2 {
	margin: 0 0 .75em 0;
}

.yhteydenotto p {
	color: white;
	font-weight: 100;
	letter-spacing: 1.8px;
	margin: .75em 0 0 0; /* jos ei lomaketta */
}

.yhteydenotto a {
	color: white;
	font-weight: 100;
}

/* 1.4 Rakenne: kuvakokoelma */

#kuvakokoelma {
	min-height: 50vh;
	margin-bottom: 17vh;
	padding-top: 7vh;
}

.container {
	text-align: center;
	height: auto;
	width: 100%;
}

.contSlides {
	display: inline-block;
	position: relative;
	height: auto;
	/*width: auto;*/
	width: 100%;
	max-height: 70vh;
	max-width: 1140px;
	padding: 0 70px;
	box-sizing: border-box;
}

.mySlides {
  display: none;
	max-height: 70vh;
	text-align: center;
	/*padding-bottom: 8px;*/
	padding-bottom: max(calc((0.8vh + 0.8vw) / 2), 5px);
	/*padding-bottom: 0;*/
	width: 99%;
	align-content: center;
	max-width: 100vw;
	margin: auto;
}

.mySlides img, .mySlides video {
  max-width: 100%;
	width: auto;
	height: 70vh;
	max-height: 100%;
	object-fit: contain;
	margin: auto;
}

.cursor {
  cursor: pointer;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
	margin-top: -39px;
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: max(3vw, 35px);
  border-radius: 0 3px 3px 0;
  user-select: none;
  -webkit-user-select: none;
	opacity: 0.8;
}

.prev {
	left: 0;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.row:after {
  content: "";
  display: table;
  clear: both;
}

.rivi {
	margin: auto;
	height: auto;
	width: 50%;
	display: flex;
  flex-wrap: nowrap;
  overflow-x: scroll;
}

.rivi div {
	aspect-ratio: 1/1;
	/* max-width: calc(100%/10); */
	height: 15vh;
	/*padding: 0 0 0 8px;*/
	padding: 0 0 0 max(calc((0.8vh + 0.8vw) / 2), 5px);
	margin: 0;
	float: left;
	white-space: nowrap;
}

.rivi div:first-of-type {
	padding: 0;
}

.demo {
  opacity: 0.6;
}

.active {
  opacity: 1;
	-webkit-filter: brightness(120%);
}

/* 1.5 Rakenne: yrityksen esittely */

.esittely {
	min-height: 45vh;
	text-align: center;
	padding: 1vh 0 7vh 0;
}

.esittely h2 {
	padding-top: 8vh;
	/*padding-top: 4vh;*//* Kun ruutu littenee */
	/*padding-top: 3vh;*/
}

.esittely p {
	margin: auto;
	font-weight: 200;
	color: white;
	width: 100%;
}

.esittely-laajakuva {
	display: none;
}

/* 1.6 Rakenne: alaotsake */

.alaotsake {
	min-height: 45vh;
	width: 100vw;
	max-width: 100%;
	background: black;
	overflow: hidden;
	font-weight: 200;
	color: white;
}

.some {
	padding-right: 4vw;
	margin: 15vh 0 0 0;
	float: right;
}

.some div {
	display: flex;
}

.some img {
	opacity: 0.5;
	padding-right: 1vw;
	min-width: 40px;
	width: 3.6vw;
}

.yhteystiedot {
	margin: 15vh 0 0 0;
	/*float: left;*//* Kun somekuvakkeet mukana. */
	display: flex;
	justify-content: center; /* Kun somekuvakkeet pois. */
}
/* Kun somekuvakkeet pois. */
.yhteystiedot div {
	display: flex;
	flex-direction: column;
}

.alaotsake p {
	display: inline-block;
	margin: 0;
	padding: 0.2vh 0; /* Kun somekuvakkeet pois. */
	/*padding: 0 20px; *//* Kun somekuvakkeet mukana. */
	text-align: center; /* Kun somekuvakkeet pois. */
}

/* Kun osoitteet on mukana.
.yhteystiedot div:first-of-type p {
	border-right: 1px solid white;
	padding-left: 5vw;
}
*/

.alaotsake a {
	text-decoration: underline;
	color: white;
}

/* 2. Yleiset elementit */

h2 {
	color: #FDF0CD;
	font-weight: 300;
}

.alkukuvat img, .rivi div img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	vertical-align: middle;
}

a {
	text-decoration: none;
}

::-webkit-scrollbar {
  width: 13px;
}

::-webkit-scrollbar-track {
  background: rgb(150,150,150); 
}
 
::-webkit-scrollbar-thumb {
  background: rgb(90,90,90);
	width: 33%;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(60,60,60); 
}

/* 3. Lomake */

form {
	text-align: left;
	margin: auto;
	width: 60vw;
	max-width: 600px;
}

form div {
	text-align: center;
}

input[type=text] {
	background-color: white;
	border: none;
	width: 100%;
	padding: 0.4vw 1vw;
	margin: 0;
	font-family: 'EB Garamond', serif;
	-webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

input[type=email] {
	background-color: white;
	border: none;
	width: 100%;
	padding: 0.4vw 1vw;
	margin: 0;
	font-family: 'EB Garamond', serif;
	-webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

textarea {
	background-color: white;
	border: none;
	width: 100%;
	padding: 5px 1vw;
	margin: 0;
	resize: none;
	font-family: 'EB Garamond', serif;
	-webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
	aspect-ratio: 5/4;
}

label {
	color: white;
	font-weight: 100;
	padding: 0.6vw 0 0.1vw 0;
	margin: 0;
	display: block;
}

button {
	background-color: black;
	border: 2px solid #FDF0CD;
	font-weight: 300;
	color: #FDF0CD;
	padding: 1vw 1.5vw;
	margin: 1.5vw 0 0 0;
	font-family: 'Poppins', sans-serif;
}

/* Kaikki fonttikoot */

nav a, nav span {
	font-size: calc(0.65rem + 0.65vw);
}
.alkukuvat a, .alkukuvat div p, .alkukuvat div ul {
	font-size: calc(0.6em + 0.6vw);
	/*font-size: calc((0.6vw + 0.6vh) / 2 + 0.6em);*/
}
h2 {
	font-size: calc(0.75em + 1.1vw);
}
.yhteydenotto a {
	font-size: calc(0.85em + 0.6vw);
}
.yhteydenotto p {
	font-size: calc(0.85em + 0.6vw);
}
label {
	font-size: calc(0.6em + 0.6vw);
}
input[type=text] {
	font-size: calc(0.8em + 0.7vw);
}
input[type=email] {
	font-size: calc(0.8em + 0.7vw);
}
textarea {
	font-size: calc(0.8em + 0.7vw);
}
button {
	font-size: calc(0.6em + 0.6vw);
}
.esittely p {
	font-size: calc(0.6em + 0.6vw);
}
.alaotsake {
	font-size: calc(0.85em + 0.6vw);
}
/* Kun somekuvakkeet mukana.
.alaotsake {
	font-size: calc(0.6em + 0.6vw);
}
*/






/* 4. Skaalaus */

/* Kapeammille kuin 450px – kännykkä */
/*
@media only screen and (max-width: 335px) {
	
	nav span:last-of-type {
		display: none;
	}
}
*/

@media only screen and (max-width: 450px) {
	
	.otsikko {
		padding: 0 0 0 2.8vw;
	}
	
	nav {
		padding: 0 2vw 0 0;
	}
	
	nav span {
		padding: 0 2vw;
	}
	
	.pudotusSisalto a {
		padding: 40px 40px;
	}
	
	#nuolivihje {
		right: calc(5.5vw + 10px);
		left: auto;
	}
	
	#nuolivihje img {
		height: 25vh;
	}
	
	.alkukuvat div p, .alkukuvat div ul {
		width: 62%;
		padding: 5vw 0 0 4vw;
		font-size: calc(0.7em + 0.6vw);
	}
	
	.alkukuvat div:last-of-type ul {
		width: 90%;
	}

	.alkukuvat a {
		padding: 0 0 5vw 4vw;
		font-size: calc(0.7em + 0.6vw);
	}
	
	.kappale2-mobiili {
		display: block;
	}
	
	.kappale2-laajakuva {
		display: none;
	}
	
	h2 {
		font-size: calc(0.95em + 1.1vw);
	}
	
	form {
		width: 80vw;
	}
	
	label {
		font-size: calc(0.7em + 0.8vw);
	}
	
	button {
		font-size: calc(0.7em + 0.8vw);
		padding: 3vw 5vw;
	}
	
	.rivi {
		width: 100%;
	}
	
	.rivi div {
		height: 12vh;
	}
	
	.contSlides {
		padding: 0;
	}
	
	.mySlides {
		width: 100%;
	}
	
	.prev, .next {
		opacity: 0.7;
		padding: 30px 22px;
		top: 47%;
	}
	
	.prev {
		left: 0;
	}
	
	.next {
		right: 0;
	}
	
	.esittely p {
		font-size: calc(10px + 1vw);
	}
	
	.alaotsake {
		display: flex;
		flex-direction: column;
		font-size: calc(12px + 1vw);
		/*font-size: calc(10px + 1vw);*//* Kun on somekuvakkeet. */
	}
	
	.some, .yhteystiedot {
		justify-content: center;
		padding: 0;
	}
	
	.some div {
		width: 50vw;
		margin: 0 auto 15vh auto;
	}
	
	.some img {
		padding-right: 4vw;
		width: 100%;
		min-height: 0;
		min-width: 0;
	}
}

/* Tabletti: pysty */
@media only screen and (min-width: 450px) and (hover: none) {
	
	.alkukuvat div p, .alkukuvat div ul {
		width: 48%;
	}
	
}

/* Esittelytekstin rivitys vaihtuu. */
@media only screen and (min-width: 450px) and (min-aspect-ratio: 100/70) {
	
	.esittely-laajakuva {
		display: block;
	}
	.esittely-mobiili {
		display: none;
	}
}

/* Alkukuvat, kappale 2, tavutus vaihtuu. */
@media only screen and (min-width: 450px) {
	
	.kappale2-laajakuva {
		display: block;
	}
	.kappale2-mobiili {
		display: none;
	}
}

/* Tabletti: vaaka */
@media only screen and (min-width: 450px) and (min-aspect-ratio: 100/99) and (hover: none) {
	
	.alkukuvat {
		height: 100vh;
	}
	/* Tähän tilalle p-elementin vaihto */
	.alkukuvat div p, .alkukuvat div ul {
		width: 300px;
	}
	
	form {
		width: 33vw;
	}
}

/* Tabletti ja vaaka kännykkä: litteä vaaka */
@media only screen and (min-width: 450px) and (min-aspect-ratio: 100/45) and (hover: none) {
	
	.alkukuvat {
		height: 100vh;
	}
}

/* Hiirelliset näytöt: pysty */
@media only screen and (min-width: 450px) and (hover: hover) {

	.alkukuvat div p, .alkukuvat div ul {
		width: 48%;
	}
	
}

/* Hiirelliset näytöt: vaaka */
@media only screen and (min-width: 450px) and (min-aspect-ratio: 100/99) and (hover: hover) {

	form {
		width: 33vw;
	}
	
	.alkukuvat div p, .alkukuvat div ul {
		width: 450px;
	}
}

/* Hiirelliset näytöt: litteä vaaka */
@media only screen and (min-width: 450px) and (min-aspect-ratio: 100/50) and (hover: hover) {
	
	.alkukuvat {
		height: 100vh;
	}
	/* Tähän tilalle p-elementin vaihto */
	.alkukuvat div p {
		width: calc(190px + 11%);
	}
}

/* Ei-hiirelliset näytöt */
@media (hover: none) {
	
	.alkukuvat::before {
	  background-image: linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,0), rgba(0,0,0,0.5), rgba(0,0,0,0.7));
		background-position: left top;
		background-repeat: no-repeat;
		background-size: 100% 100%;
		z-index: 3;
		content: "";
		width: 100%;
		height: 100%;
		position: absolute;
	}
	
	.alkukuvat div {
		opacity: 1;
	}
}

/* Hiirelliset näytöt */
@media (hover: hover) {
	
	.alkukuvat::before {
	  background-image: linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,0), rgba(0,0,0,0.3), rgba(0,0,0,0.5));
		background-position: left top;
		background-repeat: no-repeat;
		background-size: 100% 100%;
		z-index: 3;
		content: "";
		width: 100%;
		height: 100%;
		position: absolute;
	}
	
	.alkukuvat:hover::before {
  	background-image: linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,0), rgba(0,0,0,0.5), rgba(0,0,0,0.7));
  	background-position: left top;
  	background-repeat: no-repeat;
  	background-size: 100% 100%;
  	z-index: 3;
  	content: "";
  	width: 100%;
  	height: 100%;
  	position: absolute;
  }
	
	.alkukuvat:hover div {
		opacity: 1;
	}
	
	.alkukuvat:hover img {
		opacity: 0.6;
		transition: 0.3s;
		-webkit-transition: 0.3s;
	}
	
	.alkukuvat:hover a {
		color: #FDF0CD;
		opacity: 1;
	}
	
	.prev:hover, .next:hover {
  	opacity: 1;
	}
	
	.demo:hover {
  	opacity: 1;
		filter: brightness(120%);
		-webkit-filter: brightness(120%);
	}
}

@media only screen and (max-width: 800px) {
	
	.alkukuvat::before {
	  background-image: linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,0), rgba(0,0,0,0.5), rgba(0,0,0,0.7));
		background-position: left top;
		background-repeat: no-repeat;
		background-size: 100% 100%;
		z-index: 3;
		content: "";
		width: 100%;
		height: 100%;
		position: absolute;
	}
	
	.alkukuvat div {
		opacity: 1;
	}
}

@media only screen and (max-width: 450px) {
	
	.alkukuvat::before {
	  background-image: linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.7), rgba(0,0,0,0.8));
		background-position: left top;
		background-repeat: no-repeat;
		background-size: 100% 100%;
		z-index: 3;
		content: "";
		width: 100%;
		height: 100%;
		position: absolute;
	}
}

/* Tekijöiden erottaja viiva, purkkaratkaisu */

@media only screen and (max-width: 680px) {
	
	.tekijoidenerottaja {
		display: none;
	}
}

/*
.yhteydenotto {
	min-height: 80vh;
}
*/
/*
.alkukuvat div ul {
	padding-top: 1.5vw;
}
*/