@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

/* ============================= */
/* Yleiset asetukset             */
/* ============================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  line-height: 1.5;
  letter-spacing: 0.009375rem;
  scroll-behavior: smooth;
  overflow-x: hidden;
  position: relative;
  height: 100%;
  overflow-y: scroll;
  scroll-padding-top: 3rem;
}

/* ============================= */
/* Navigointipalkki               */
/* ============================= */
.navigointi {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #1a1a1a;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  padding: 0.75rem 1rem;
  height: 3rem;
  line-height: 1.5rem;
}

.navigointi ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.navigointi a {
  color: #ccc;
  text-decoration: none;
  padding: 0.6rem 1rem;
  font-size: 1.125rem;
  border-radius: 0.3rem;
  transition: background-color 0.2s ease;
}

.navigointi a:active {
  background-color: rgba(255, 255, 255, 0.15);
}

.navigointi a.aktiivinen {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 600;
}

/* ============================= */
/* Main sisältö                  */
/* ============================= */
main {
  position: relative;
  z-index: 1;
  margin-inline: auto;
  padding-top: 3.75rem;
  padding-inline: clamp(1rem, 4vw, 2rem);
  width: 100%;
  max-width: 750px;
  overflow-wrap: break-word;
  font-size: 1.25rem;
  box-sizing: border-box;
}
@media (max-width: 500px) {
  main {
    padding: 3.75rem 1rem 1rem 1rem;
    max-width: 100%;
  }
}

/* ============================= */
/* Taustakuva                    */
/* ============================= */
.taustakuva {
  position: fixed;
  top: -5vh;
  left: -5vw;
  width: 110vw;
  height: 110vh;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/img/taustakuva.WEBP');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform, opacity;
  backface-visibility: hidden;
  filter:blur(10px);
  overflow: hidden;
  z-index: -1;
}


/* ============================= */
/* Hero-osa                    */
/* ============================= */
.hero {
  position: relative;
  height: 40vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 3rem;
  padding-bottom: 1.5rem;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  margin-bottom: 1.5rem;
  line-height: 1.5rem;
  font-weight: 350;
}

.etusivunkuva {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.6);
}

/* ============================= */
/* Nappulat (button-linkit)      */
/* ============================= */
.btn {
  display: inline-block;
  background-color: #201c1c;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  margin-top: 1rem;
  cursor: pointer;
  user-select: none;
}



/* ============================= */
/* Tekstin määrittely           */
/* ============================= */
h1,
h2,
h3,
h4,
h5 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0;
  text-align: center;
  color: white;
  margin-top: 0;
  margin-bottom: 1rem;
}

ul li {
  color: white;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

p {
  color: white;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.6;
  margin-bottom: 1rem;
}

a {
  text-decoration: underline;
  color: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: #ddd;
}

/* ============================= */
/* Gallerian määrittely          */
/* ============================= */
.galleria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 1em 0;
}

.galleria-kohta {
  flex: 1 1 300px;
  max-width: 45vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 600px) {
  .galleria-kohta {
    max-width: 90vw;
  }
}

.galleria-kohta img {
  width: 100%;
  max-height: 500px;
  border-radius: 18px;
  object-fit: contain;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: auto;
  will-change: transform;
  transform-origin: center center;
}

.galleria-kohta:hover img {
  transform: scale(1.05);

}

img {
  max-width: 100%;
  height: auto;
  display: block;
  /* poistaa mahdolliset alareunan tyhjät tilat inline-kuvissa */
}

/* ============================= */
/* Footer                      */
/* ============================= */
footer {
  margin-top: auto;
  padding: 1em;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  border-top: 3px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 1em 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
  font-size: 110%;
}

footer ul a {
  color: inherit;
  padding: 0.25em 0.5em;
  display: inline-block;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}

footer ul a:hover,
footer ul a:focus {
  color: white;
  transform: scale(1.05);
  outline: none;
}

@media (min-width: 600px) {
  footer ul {
    flex-direction: row;
    justify-content: center;
  }
}

/* ============================= */
/* Palvelulista                 */
/* ============================= */
.palvelulista {
  list-style: none;
  padding: 0;
  margin: 2rem auto;
  max-width: 600px;
  width: 90%;
  font-family: 'Roboto', sans-serif;
  font-size: 1.2rem;
  color: #222;
}

.palvelulista li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.palvelulista li:last-child {
  border-bottom: none;
}

.palvelulista li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-color: #4CAF50;
  border-radius: 50%;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
}