/* === PERUSASETUKSET JA TYPOGRAFIA === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Manrope', sans-serif;
  background: transparent;
  color: #fff;
  overflow-x: hidden;
  text-align: center;
}

/* === h1-tason otsikko piiloon === */
.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* === VIDEO-TAUSTA === */
#bg-video {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top right;
  z-index: -1;
}

/* === GRID-RAKENNE === */
body {
  display: grid;
  grid-template-rows: 
    minmax(60px, 1fr) auto 
    minmax(60px, 1fr) auto 
    minmax(60px, 1fr) auto;
  min-height: 100vh;
}

/* === PÄÄLOGO === */
.main-logo {
  grid-row: 2;
  justify-self: center;
  width: 80%;
  max-width: 600px;
  height: auto;
}

/* === LOGOT JA NIIDEN RAKENNE === */
.logos-block {
  grid-row: 4;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
}

.logos {
  display: flex;
  justify-content: center;
  gap: 3rem;
  width: 100%;
  position: relative;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  padding: 0 1rem;
}

.logo-wrapper img {
  width: 100%;
  max-width: 500px;
  max-height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
  transition: opacity 0.5s, filter 0.5s;
  filter: grayscale(0%) contrast(0%) brightness(1.1);
}

.logo:hover img {
  filter: grayscale(0%) contrast(100%) brightness(1);
}

/* Erityisleveydet logoille */
.logo--audiamond .logo-wrapper { width: 275px; }
.logo--salpaus  .logo-wrapper { width: 200px; }
.logo--tkotf    .logo-wrapper { width: 400px; }

.logo:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
}

/* === HOVER-TEKSTIT === */
.hover-texts {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 900px;
  font-size: 1rem;
  color: #ddd;
  min-height: 2rem;
  position: relative;
}

.hover-texts span {
  width: 100%;
  white-space: normal;
  opacity: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.5s;
  display: block;
}

.hover-texts span.show {
  opacity: 1;
}

.caption {
  display: none;
  font-size: 0.95rem;
  color: #ccc;
  margin-top: 0.5rem;
  text-align: center;
  max-width: 80vw;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

/* === FOOTER JA YHTEYSTIEDOT === */
footer {
  grid-row: 6;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  width: 100%;
  z-index: 100;
  position: static;
  bottom: 0;
  left: 0;
  opacity: 1;
  text-align: center;
}

.footer-text {
  color: #aaa;
  font-size: 0.9rem;
  margin: 0.3rem 0;
}

.footer-text span {
  color: #aaa;
  transition: color 0.3s ease;
}

.footer-text span:hover {
  color: #fff;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin: 0.5rem 0;
}

/* === FOOTERIN LINKIT === */
.footer-link,
.lang-toggle,
.email-copy {
  color: #aaa;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.footer-link:hover,
.lang-toggle:hover,
.email-copy:hover {
  color: #fff;
}

.lang-toggle {
  display: inline-block;
  margin-left: 1rem;
  font-size: 0.8rem;
}

.email-copy {
  text-decoration: underline dotted;
  position: relative;
}

.email-copy::after {
  content: "Klikkaa kopioidaksesi";
  position: absolute;
  bottom: 100%;
  left: 0;
  transform: translateY(-5px);
  background: rgba(0, 0, 0, 0.7);
  color: #ccc;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.email-copy:hover::after {
  opacity: 1;
}

.footer-link img,
.footer-icon {
  height: 1em;
  vertical-align: middle;
  transition: filter 0.2s ease, opacity 0.2s ease;
  opacity: 0.8;
  filter: grayscale(100%);
}

.footer-link:hover img,
.footer-link:hover .footer-icon {
  opacity: 1;
  filter: grayscale(0%);
}


/* === Footerin Salpaus-linkki (SVG-ikoni) === */

.footer-item.salpaus-link a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-item.salpaus-link a:hover {
  color: #fff;
}

.footer-row.salpaus-link .salpaus-icon {
  height: 0.8em;
  max-height: 1.2em;
  width: auto;
  display: inline-block;
  vertical-align: text-bottom;
  position: relative;
  bottom: 0.2em;
  opacity: 0.85;
}

.footer-row.salpaus-link {
  justify-content: center;
  text-align: center;
}

.footer-contact,
.credits {
  margin: 0.3rem 0;
  font-size: 0.75rem;
  opacity: 0.75;
}
/* ============================
   MOBIILIASSETTELU ALLE 1024px
   ============================ */

@media (max-width: 1023px) {
  body {
    font-size: 16px;
  }

  .logos-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
  }

  .logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .logo {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .logo img {
    filter: grayscale(10%) contrast(90%) brightness(1);
  }

.logo--audiamond .logo-wrapper,
.logo--salpaus .logo-wrapper,
.logo--tkotf .logo-wrapper {
  width: 85vw;
  height: auto;
}

  .logo-wrapper img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* Poista hover-efektit mobiilista */
  .logo:hover,
  .logo-wrapper:hover,
  .logo img:hover {
    filter: none;
    opacity: 1;
  }

  /* Yritystekstit (mikäli lisätään) näkyviin mobiilissa */
  .caption {
    display: block;
    width: 500px;
    font-size: 0.95rem;
    color: #ccc;
    text-align: center;
    max-width: 80vw;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;
    margin-bottom: 2rem;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.0);
    padding-bottom: 3rem;
  }

  .hover-texts {
    display: none;
  }

  /* Footerin some/viestipalkin asettelu tarvittaessa */
  footer .icons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  footer .icon {
    flex: 0 0 auto;
  }
}
