
:root {
  --oma-cream: #f2e9dc;
  --oma-forest: #46543c;
  --oma-forest-deep: #263129;
  --oma-paper: #fffaf3;
  --oma-line: rgba(70,84,60,.18);
  --oma-hero-x: 50%;
  --oma-hero-y: 50%;
  --oma-hero-height: 600px;
  --oma-hero-height-mobile: 440px;
}

/* Säilyttää nykyisen OMA-kielen ja antaa Poluille saman kodin. */
.oma-ilme-active .oma-polut {
  color: var(--oma-forest-deep);
}

.oma-ilme-active .oma-polut__card,
.oma-ilme-active .oma-polut__promise,
.oma-ilme-active .oma-polut__compass,
.oma-ilme-active .oma-polut__stop-content {
  background: var(--oma-paper);
  border-color: var(--oma-line);
}

.oma-ilme-active .oma-polut__surprise,
.oma-ilme-active .oma-polut__path-end,
.oma-ilme-active .oma-polut__chapter span {
  background: var(--oma-forest);
}

.oma-ilme-active .oma-polut__eyebrow,
.oma-ilme-active .oma-polut__card a,
.oma-ilme-active .oma-polut__stop-link,
.oma-ilme-active .oma-polut__back {
  color: var(--oma-forest);
}

/* Uusi responsiivinen hero. Ei venytä kuvaa, vaan rajaa sen hallitusti. */
.oma-responsive-hero {
  position: relative;
  isolation: isolate;
  min-height: var(--oma-local-height, var(--oma-hero-height));
  overflow: hidden;
  background: var(--oma-forest-deep);
  color: #fff;
}

.oma-responsive-hero__media,
.oma-responsive-hero__shade {
  position: absolute;
  inset: 0;
}

.oma-responsive-hero__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--oma-local-position, var(--oma-hero-x) var(--oma-hero-y));
  image-rendering: auto;
}

.oma-responsive-hero__shade {
  z-index: 1;
  background:
    linear-gradient(90deg,
      rgba(20,28,24,.88) 0%,
      rgba(20,28,24,.66) 30%,
      rgba(20,28,24,.18) 60%,
      rgba(20,28,24,0) 82%);
}

.oma-responsive-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: inherit;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) clamp(22px, 6vw, 88px);
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.oma-responsive-hero__eyebrow {
  margin: 0 0 16px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.oma-responsive-hero h1 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 9vw, 7.2rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.045em;
}

.oma-responsive-hero__link {
  margin-top: 28px;
  padding: 13px 20px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
}

/* Vapaaehtoinen korjaus nykyisille hero-elementeille. */
.oma-ilme-active :is(.oma-hero,.oma-hero-section,.hero-banner,.hero-section,[data-oma-hero]) > img,
.oma-ilme-active :is(.oma-hero,.oma-hero-section,.hero-banner,.hero-section,[data-oma-hero]) picture,
.oma-ilme-active :is(.oma-hero,.oma-hero-section,.hero-banner,.hero-section,[data-oma-hero]) picture > img {
  width: 100%;
  height: 100%;
}

.oma-ilme-active :is(.oma-hero,.oma-hero-section,.hero-banner,.hero-section,[data-oma-hero]) > img,
.oma-ilme-active :is(.oma-hero,.oma-hero-section,.hero-banner,.hero-section,[data-oma-hero]) picture > img {
  object-fit: cover;
  object-position: var(--oma-hero-x) var(--oma-hero-y);
}

@media (max-width: 782px) {
  .oma-responsive-hero {
    min-height: var(--oma-hero-height-mobile);
  }

  .oma-responsive-hero__shade {
    background:
      linear-gradient(180deg,
        rgba(20,28,24,.22) 0%,
        rgba(20,28,24,.78) 72%,
        rgba(20,28,24,.9) 100%);
  }

  .oma-responsive-hero__content {
    justify-content: flex-end;
    padding-bottom: 44px;
  }

  .oma-responsive-hero h1 {
    font-size: clamp(3.4rem, 18vw, 5.5rem);
  }
}

@media (min-width: 1800px) {
  .oma-responsive-hero {
    min-height: max(var(--oma-local-height, var(--oma-hero-height)), 660px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .oma-responsive-hero * {
    scroll-behavior: auto;
  }
}
