/* Hero-sivuasettelu (landing, palvelut, …) — page_layout: hero */

body.page-hero-layout #content.body,
body.page-hero-layout #extras.body,
body.page-hero-layout #contentinfo.body {
    max-width: none;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

body.page-hero-layout #content.page-hero-section {
    padding: 0;
    border-radius: 0;
    -moz-border-radius: 0;
    -webkit-border-radius: 0;
}

.hero-cover {
    /* Perus-hero: kiinteä näkymän korkeus (100svh), tekstit neljänneksissä ~25 % / 50 % / 75 % */
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    background-color: #141414;
    color: #f5f5f5;
}

.hero-cover__stack {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
}

.hero-cover__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    z-index: 0;
}

.hero-cover__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42));
    pointer-events: none;
}

.hero-cover__inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    align-items: start;
    justify-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.hero-cover__rail {
    grid-row: 1;
    grid-column: 1;
    min-height: 0;
}

.hero-cover__title {
    grid-row: 2;
    grid-column: 1;
    align-self: start;
    max-width: min(72rem, 100%);
    margin: 0;
    font-size: clamp(2.35rem, 5.2vw, 3.85rem);
    font-weight: 700;
    line-height: 1.08;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.hero-cover__title a:link,
.hero-cover__title a:visited {
    color: #fff;
    text-decoration: none;
}

.hero-cover__title a:hover,
.hero-cover__title a:active {
    color: #fff;
    background: transparent;
    text-decoration: underline;
    text-shadow: none;
}

.hero-cover__lead {
    grid-row: 3;
    grid-column: 1;
    align-self: start;
    max-width: min(72rem, 100%);
    margin: 0;
    font-size: clamp(1.12rem, 2.35vw, 1.45rem);
    line-height: 1.45;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
    white-space: pre-line;
}

.hero-cover__lead--empty {
    visibility: hidden;
    min-height: 0;
    margin: 0;
    padding: 0;
}

/* Yhteystiedot: sivun sisältö heron päällä, normaalikokoinen teksti */
.hero-cover--with-body .hero-cover__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    overflow-y: auto;
    padding-top: clamp(1.5rem, 4vw, 2.5rem);
    padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.hero-cover--with-body .hero-cover__rail {
    display: none;
}

.hero-cover--with-body .hero-cover__title,
.hero-cover--with-body .hero-cover__lead {
    grid-row: auto;
    grid-column: auto;
}

.hero-cover__content {
    max-width: min(42rem, 100%);
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-cover__content h2 {
    margin: 1.25em 0 0.5em;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
}

.hero-cover__content h2:first-child {
    margin-top: 0;
}

.hero-cover__content p {
    margin: 0 0 0.85em;
}

.hero-cover__content p:last-child {
    margin-bottom: 0;
}

.hero-cover__content a:link,
.hero-cover__content a:visited {
    color: #fff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.hero-cover__content a:hover,
.hero-cover__content a:active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-shadow: none;
}

.hero-cover__meta {
    grid-row: 4;
    grid-column: 1;
    align-self: start;
    max-width: min(72rem, 100%);
    font-size: 1.02rem;
    opacity: 0.92;
}

/* Ei koske CTA:ta — .hero-cover a:hover on spesifisempi kuin .hero-cover__cta:hover (elementti a). */
.hero-cover a:link:not(.hero-cover__cta),
.hero-cover a:visited:not(.hero-cover__cta) {
    color: #fff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.hero-cover a:hover:not(.hero-cover__cta),
.hero-cover a:active:not(.hero-cover__cta) {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-shadow: none;
}

/* #content + a.hero-cover__cta voittaa main.css globaalin a:link / a:hover. */
#content .hero-cover a.hero-cover__cta:link,
#content .hero-cover a.hero-cover__cta:visited {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0.5em 1.2em;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    color: #000305;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    text-shadow: none;
}

#content .hero-cover a.hero-cover__cta:hover,
#content .hero-cover a.hero-cover__cta:active {
    color: #000305;
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.35);
    text-decoration: none;
    text-shadow: none;
}

.hero-page-main {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1rem, 4vw, 2.5rem) 2.5rem;
    background: #f5f4ef;
    color: #000305;
}

.hero-page-main a:link,
.hero-page-main a:visited {
    color: #c74350;
}

.hero-page-main a:hover,
.hero-page-main a:active {
    background-color: #c74350;
    color: #fff;
}

.hero-page-main h2,
.hero-page-main h3,
.hero-page-main h4 {
    color: inherit;
}

.hero-page-credit {
    margin: 0;
    padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
    font-size: 0.7rem;
    line-height: 1.35;
    text-align: right;
    color: rgba(0, 3, 5, 0.45);
    background: #f5f4ef;
    box-sizing: border-box;
}

.hero-page-credit a:link,
.hero-page-credit a:visited {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 1px;
}

.hero-page-credit a:hover,
.hero-page-credit a:active {
    color: rgba(0, 3, 5, 0.7);
    background: transparent;
}
