/* ==========================================================
   HERO.CSS
   Kuvat suhteessa tähän tiedostoon:
   styles/hero.css
   ========================================================== */


/* ==========================================================
   PERUSRAKENNE
   ========================================================== */

#hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.hero-slide {
  display: none;
  position: relative;
  width: 100%;
  min-height: 36.46vw;

  background-image: url("../images/hero/hero1tausta.webp");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}


/* ==========================================================
   HERO SISÄLTÖ
   ========================================================== */

.hero-inner {
  position: relative;
  z-index: 1;

  max-width: var(--max-width);
  min-height: 36.46vw;

  margin: 0 auto;
  padding: var(--space-lg) var(--container-padding);

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;

  gap: var(--space-lg);
}


/* ==========================================================
   VASEN PUOLI
   ========================================================== */

.hero-left {
  flex: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;

  gap: var(--space-sm);
}


/* ==========================================================
   OIKEA PUOLI
   ========================================================== */

.hero-right {
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: flex-end;
}


/* ==========================================================
   KASVOKUVA
   ========================================================== */

.hero-portrait {
  width: clamp(120px, 22vw, 320px);
  height: clamp(120px, 22vw, 320px);

  object-fit: cover;
  border-radius: 50%;

  box-shadow: 0 0 0 2px #ffffff;
}


/* ==========================================================
   KESKUSTA-LOGO
   ========================================================== */

.hero-logo {
  height: clamp(48px, 6vw, 60px);
  width: auto;

  filter: brightness(0) invert(1);
  opacity: 0.9;
}


/* ==========================================================
   EDISTYSNUOLI
   ========================================================== */

.hero-arrow {
  height: clamp(28px, 3.5vw, 48px);
  width: auto;

  filter: brightness(0) invert(1);
  opacity: 0.85;
}


/* ==========================================================
   HERO 1
   ========================================================== */

#hero1 .hero-name {
  font-family: var(--font-heading);
  font-weight: 600;

  font-size: clamp(1.25rem, 3vw, 2.75rem);

  color: #ffffff;
  line-height: 1.15;

  margin-bottom: 0;
  text-align: left;
}

#hero1 .hero-title {
  font-family: var(--font-heading);
  font-weight: 300;

  font-size: clamp(0.65rem, 1.2vw, 1rem);

  color: rgba(255, 255, 255, 0.8);

  line-height: 1.5;

  margin-bottom: 0;
}


/* ==========================================================
   HERO 2
   ========================================================== */

#hero2 .hero-left {
  align-items: center;
  text-align: center;
}

#hero2 .hero-logo {
  align-self: center;
}

#hero2 .hero-arrow {
  align-self: center;
}

#hero2 .hero-slogan {
  font-family: var(--font-heading);
  font-weight: 600;

  font-size: clamp(1.5rem, 3.5vw, 3.5rem);

  color: #ffffff;

  line-height: 1.1;

  margin-bottom: 0;

  text-align: center;
}


/* ==========================================================
   MOBIILI
   ========================================================== */

@media (max-width: 600px) {

  .hero-slide {
    min-height: 0;

    background-image: url("../images/hero/hero1taustapysty.webp");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .hero-inner {
    min-height: 150vw;

    flex-direction: column;

    justify-content: center;

    gap: var(--space-md);

    padding: var(--space-md) var(--container-padding);
  }


  /* Molemmat puolet täyteen leveyteen */

  .hero-left,
  .hero-right {
    width: 100%;

    justify-content: center;
    align-items: center;

    text-align: center;
  }


  /* Kasvokuva */

  .hero-portrait {
    width: clamp(100px, 40vw, 180px);
    height: clamp(100px, 40vw, 180px);
  }


  /* Hero 1:
     kuva ensin
     teksti sen jälkeen
  */

  #hero1 .hero-right {
    order: -1;
  }

  #hero1 .hero-left {
    order: 1;
  }


  /* Hero 2:
     teksti ensin
     kuva sen jälkeen
  */

  #hero2 .hero-left {
    order: -1;
    align-items: center;
  }

  #hero2 .hero-right {
    order: 1;
  }


  /* Hero 1 tekstit */

  #hero1 .hero-name {
    font-size: clamp(1.2rem, 6vw, 1.75rem);
    text-align: center;
  }

  #hero1 .hero-title {
    font-size: clamp(0.7rem, 3vw, 0.9rem);
    text-align: center;
  }


  /* Hero 2 tekstit */

  #hero2 .hero-slogan {
    font-size: clamp(1.3rem, 6vw, 2rem);
    text-align: center;
  }

  #hero2 .hero-logo,
  #hero2 .hero-arrow {
    align-self: center;
  }
}


/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}
