/* Selaimen oletusmuuttujien nollaus ja perusasetukset */
:root {
    --background-color: initial;
    --color: initial;
    --font-family: initial;
    --font-size: initial;
    --line-height: initial;
    --border-radius: initial;
    --link-color: initial;
    --link-hover-color: initial;
    --primary-color: initial;
    --secondary-color: initial;
    --accent-color: initial;
    --success-color: initial;
    --warning-color: initial;
    --error-color: initial;
    --info-color: initial;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    vertical-align: baseline;

	--page-width: 1500px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
}

/* HTML-perusasetukset: fontti, taustaväri, tekstin tasaus jne. */
html {
    scroll-behavior: smooth;
    font-size: 12px;
    font-family: Helvetica, Arial, sans-serif;
    line-height: 12px;
	text-align: justify;
  	text-align-last: left;
    background-color: #ffffff;
    color: #000000;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
    overscroll-behavior: none;
}

html, body {
	width: 100%;
	height: 100%;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.nav {
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 80px;
    max-width: calc(var(--page-width) - 80px);
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 200px;
}

main {
    padding-top: 160px !important;
    padding-bottom: 160px !important;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: visible; /* Varmistaa että hehku ei leikkaannu */
    border-radius: 0; /* Poistetaan mahdollinen pyöristys */
    z-index: 100;
}

.footer {
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: flex-end;
    padding: 40px 80px;
    gap: 200px;
    max-width: calc(var(--page-width) - 80px);
}

.footer-connect {
    display: flex;
    flex-direction: column;
}

/* Logo, linkit ja footerin elementit: valkoinen hehku */
.nav-logo,
.nav-links,
.footer .slogan,
.footer .footer-connect,
.footer .our-name {
    z-index: 99;
}

/* Näkymätön elementti saavutettavuudella ja SEO:lla */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Sivun sisällön leveys ja marginaalit */
.wrapper {
    margin: 0 auto;
    padding: 0 40px;
    max-width: var(--page-width);
}

ul, li {
    list-style: none;
}

a {
    color: #000000;
    text-decoration: none;
    width: fit-content;
	transition: color 200ms;
}

a:hover,
a:focus,
.lightbox-button:hover,
.lightbox-button:focus {
	color: rgba(0, 0, 0, 0.5);
}

a:active,
.lightbox-button:active {
	color: rgba(0, 0, 0, 0.75);
}

h1, h2, h3, h4, h5, h6, p, a {
    font-weight: normal;
    font-size: inherit;
}

.gallery {
    width: 100%;
}

/* Gallerian kuvat ja picture-elementit: täyttävät tilan */
.gallery img,
.gallery picture {
    height: auto;
    display: block;
    object-fit: cover;
	overflow: hidden;
}

.img-4,
.img-3,
.img-2,
.img-1 {
    display: flex;
    flex-flow: row wrap;
}

.img-4 img,
.img-4 picture {
    width: 25%;
}
.img-3 img,
.img-3 picture {
    width: calc(100% / 3);
}
.img-2 img,
.img-2 picture {
    width: 50%;
}
.img-1 img,
.img-1 picture {
    width: 100%;
}

.gallery picture img {
    width: 100%;
    height: 100%;
}

picture {
    cursor: zoom-in;
}

.meista,
.f0f {
	margin: 0 auto;
	width: 400px;
	height: calc(100vh - 320px);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

.footer > div,
.nav > * {
	z-index: 10;
}

@media screen and (min-width: 700px) {
    
    nav {
        background: linear-gradient(180deg,rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    }
    
    footer {
        background: linear-gradient(0deg,rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    }
    
    .nav-logo,
    .nav-links,
    .footer .slogan,
    .footer .footer-connect,
    .footer .our-name {
    	filter: 
    		drop-shadow(0 0 40px rgba(255, 255, 255, 0.25))
    		drop-shadow(0 0 64px rgba(255, 255, 255, 0.5))
    		drop-shadow(0 0 80px rgba(255, 255, 255, 0.75))
        	drop-shadow(0 0 96px rgb(255, 255, 255));
    }
 
    /* Gradient blur -elementit navissa ja footerissa */
    .gradient-blur-footer,
    .gradient-blur-nav {
    	position: fixed;
    	z-index: 5;
    	height: 160px;
    	pointer-events: none;
    }
    
    .gradient-blur-footer > div,
    .gradient-blur-footer::before,
    .gradient-blur-footer::after,
    .gradient-blur-nav > div,
    .gradient-blur-nav::before,
    .gradient-blur-nav::after {
    	position: absolute;
    	inset: 0;
    }
    
    /* Footerin blur-kerrokset (alhaalta ylös) */
    .gradient-blur-footer {
    	inset: auto 0 0 0;
    }
    .gradient-blur-footer::before {
    	content: "";
    	z-index: 1;
    	backdrop-filter: blur(0.5px);
    	mask: linear-gradient(to bottom,
    		rgba(0,0,0,0) 0%,
    		rgba(0,0,0,1) 12.5%,
    		rgba(0,0,0,1) 25%,
    		rgba(0,0,0,0) 37.5%);
    }
    .gradient-blur-footer > div:nth-of-type(1) {
    	z-index: 2;
    	backdrop-filter: blur(1px);
    	mask: linear-gradient(to bottom,
    		rgba(0,0,0,0) 12.5%,
    		rgba(0,0,0,1) 25%,
    		rgba(0,0,0,1) 37.5%,
    		rgba(0,0,0,0) 50%);
    }
    .gradient-blur-footer > div:nth-of-type(2) {
    	z-index: 3;
    	backdrop-filter: blur(2px);
    	mask: linear-gradient(to bottom,
    		rgba(0,0,0,0) 25%,
    		rgba(0,0,0,1) 37.5%,
    		rgba(0,0,0,1) 50%,
    		rgba(0,0,0,0) 62.5%);
    }
    .gradient-blur-footer > div:nth-of-type(3) {
    	z-index: 4;
    	backdrop-filter: blur(4px);
    	mask: linear-gradient(to bottom,
    		rgba(0,0,0,0) 37.5%,
    		rgba(0,0,0,1) 50%,
    		rgba(0,0,0,1) 62.5%,
    		rgba(0,0,0,0) 75%);
    }
    .gradient-blur-footer > div:nth-of-type(4) {
    	z-index: 5;
    	backdrop-filter: blur(8px);
    	mask: linear-gradient(to bottom,
    		rgba(0,0,0,0) 50%,
    		rgba(0,0,0,1) 62.5%,
    		rgba(0,0,0,1) 75%,
    		rgba(0,0,0,0) 87.5%);
    }
    .gradient-blur-footer > div:nth-of-type(5) {
    	z-index: 6;
    	backdrop-filter: blur(16px);
    	mask: linear-gradient(to bottom,
    		rgba(0,0,0,0) 62.5%,
    		rgba(0,0,0,1) 75%,
    		rgba(0,0,0,1) 87.5%,
    		rgba(0,0,0,0) 100%);
    }
    .gradient-blur-footer > div:nth-of-type(6) {
    	z-index: 7;
    	backdrop-filter: blur(32px);
    	mask: linear-gradient(to bottom,
    		rgba(0,0,0,0) 75%,
    		rgba(0,0,0,1) 87.5%,
    		rgba(0,0,0,1) 100%);
    }
    .gradient-blur-footer::after {
    	content: "";
    	z-index: 8;
    	backdrop-filter: blur(64px);
    	mask: linear-gradient(to bottom,
    		rgba(0,0,0,0) 87.5%,
    		rgba(0,0,0,1) 100%);
    }
    
    /* Navin blur-kerrokset (ylhäältä alas) */
    .gradient-blur-nav {
    	inset: 0 0 auto 0;
    }
    .gradient-blur-nav::before {
    	content: "";
    	z-index: 1;
    	backdrop-filter: blur(0.5px);
    	mask: linear-gradient(to top,
    		rgba(0,0,0,0) 0%,
    		rgba(0,0,0,1) 12.5%,
    		rgba(0,0,0,1) 25%,
    		rgba(0,0,0,0) 37.5%);
    }
    .gradient-blur-nav > div:nth-of-type(1) {
    	z-index: 2;
    	backdrop-filter: blur(1px);
    	mask: linear-gradient(to top,
    		rgba(0,0,0,0) 12.5%,
    		rgba(0,0,0,1) 25%,
    		rgba(0,0,0,1) 37.5%,
    		rgba(0,0,0,0) 50%);
    }
    .gradient-blur-nav > div:nth-of-type(2) {
    	z-index: 3;
    	backdrop-filter: blur(2px);
    	mask: linear-gradient(to top,
    		rgba(0,0,0,0) 25%,
    		rgba(0,0,0,1) 37.5%,
    		rgba(0,0,0,1) 50%,
    		rgba(0,0,0,0) 62.5%);
    }
    .gradient-blur-nav > div:nth-of-type(3) {
    	z-index: 4;
    	backdrop-filter: blur(4px);
    	mask: linear-gradient(to top,
    		rgba(0,0,0,0) 37.5%,
    		rgba(0,0,0,1) 50%,
    		rgba(0,0,0,1) 62.5%,
    		rgba(0,0,0,0) 75%);
    }
    .gradient-blur-nav > div:nth-of-type(4) {
    	z-index: 5;
    	backdrop-filter: blur(8px);
    	mask: linear-gradient(to top,
    		rgba(0,0,0,0) 50%,
    		rgba(0,0,0,1) 62.5%,
    		rgba(0,0,0,1) 75%,
    		rgba(0,0,0,0) 87.5%);
    }
    .gradient-blur-nav > div:nth-of-type(5) {
    	z-index: 6;
    	backdrop-filter: blur(16px);
    	mask: linear-gradient(to top,
    		rgba(0,0,0,0) 62.5%,
    		rgba(0,0,0,1) 75%,
    		rgba(0,0,0,1) 87.5%,
    		rgba(0,0,0,0) 100%);
    }
    .gradient-blur-nav > div:nth-of-type(6) {
    	z-index: 7;
    	backdrop-filter: blur(32px);
    	mask: linear-gradient(to top,
    		rgba(0,0,0,0) 75%,
    		rgba(0,0,0,1) 87.5%,
    		rgba(0,0,0,1) 100%);
    }
    .gradient-blur-nav::after {
    	content: "";
    	z-index: 8;
    	backdrop-filter: blur(64px);
    	mask: linear-gradient(to top,
    		rgba(0,0,0,0) 87.5%,
    		rgba(0,0,0,1) 100%);
    }
    
}



/* Koko sivun levyinen blur navin yläpuolelle */
.all-blur-nav {
    position: fixed;
    top: -160px;
    left: 0;
    width: 100vw;
    height: 160px;
    backdrop-filter: blur(64px);
    z-index: 9;
    pointer-events: none;
}

/* Koko sivun levyinen blur footerin alapuolelle */
.all-blur-footer {
    position: fixed;
    bottom: -160px;
    left: 0;
    width: 100vw;
    height: 160px;
    backdrop-filter: blur(64px);
    z-index: 9;
    pointer-events: none;
}

/* Lightboxin ja modaalin tyylit */
.lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(80px);
	-webkit-backdrop-filter: blur(80px);
}

.lightbox-img {
	position: fixed;
	z-index: 10000;
	object-fit: contain;
	background: transparent;
	overflow: hidden;
	cursor: default;
	touch-action: none; /* allow pointer-based swipe handling */
	-webkit-user-drag: none;
	-webkit-user-select: none;
	user-select: none;
}

.lightbox-img.dragging {
	cursor: grabbing;
}

.lightbox-controls {
	position: fixed;
	z-index: 10010;
	inset: 0;
	pointer-events: none;
}

.lightbox-button {
	position: absolute;
	pointer-events: auto;
	color: #000000;
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background-color: transparent;
	z-index: 10011;
	overflow: visible;
	transition: color 200ms;
}

.lightbox-button::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% + 160px);
	height: calc(100% + 160px);
	border-radius: 50%;
	pointer-events: none;
	background: radial-gradient(circle at center, rgba(255,255,255,1) 0%, rgba(255,255,255,0.1) 45%, rgba(255,255,255,0) 80%);
	filter: blur(64px);
	z-index: 10012;
	mix-blend-mode: normal;
}

.lightbox-close {
	top: 24px;
	right: 24px;
}

.lightbox-arrow {
	top: 50%;
	transform: translateY(-50%);
}
.lightbox-prev {
	left: 24px;
}
.lightbox-next {
	right: 24px;
}

.lightbox-button svg {
	width: 40px;
	height: 40px;
	position: relative;
	z-index: 10013;
}

/* Estetään sivun scrollaus kun modal on auki */
body.modal-open {
	overflow: hidden;
	touch-action: none;
}

/* Scroll-lock html-tasolla, käytetään JS:llä layoutin säilyttämiseksi */
.plumma-scroll-lock {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
	overflow: hidden;
}

@media screen and (max-width: 700px) {
    /* Responsiiviset säädöt mobiilille */

    .nav, .footer {
        padding: 8px 16px;
    }
	
    .nav-links, .footer {
        gap: 40px;
    }

    .wrapper {
        padding: 0 8px;
    }

	.meista,
	.f0f {
		width: 100%;
	}

    .img-4 img,
    .img-4 picture {
        width: 50%;
    }

    .img-3 img,
    .img-3 picture,
	.img-2 img,
	.img-2 picture {
        width: 100%;
    }

	.lightbox-prev,
	.lightbox-next {
		/* Piilotetaan nuolinapit mobiilissa */
		display: none;
	}

	/* Kuvan reunat puhelimella */
	.lightbox-img {
		max-width: calc(100vw - 16px);
		box-sizing: border-box;
		cursor: grab;
	}

	.lightbox-img.dragging {
		cursor: grabbing;
	}

	.lightbox-close {
		top: 8px;
		right: 8px;
	}
}

/* Loaderin overlay-tyyli */
#loader {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(80px);
	z-index: 9999;
	opacity: 1;
	/* Sujuva fade-in ja fade-out */
	transition: opacity 0.5s ease-in-out;
}

/* Loaderin ikonien wrapper */
#loader .icon-wrapper {
	position: relative;
  	width: 160px;
	height: 160px;
}

/* Loaderin yksittäisen ikonin tyyli */
#loader .icon-wrapper img {
	position: absolute;
	inset: 0;
	margin: auto;
	height: 100%;
	width: auto;
	opacity: 0;
	transition: opacity 0.25s ease;
	z-index: 2;
}

/* Loaderin taustalla oleva hehku */
.loader-glow {
	position: absolute;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	background: radial-gradient(circle at center, rgba(255,255,255,1) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
	filter: blur(160px);
	z-index: 1;
}