/**
 * Project: Index Varainhoito's shape language on top of the base theme.
 *
 * Loaded last on the front end and in the editor, so the values here win
 * over the :root defaults of the block files without editing those files
 * (pohja merges stay clean). Colors and fonts are in colors.css and
 * typography.css as usual; this file holds the rest of the Index look that
 * the old theme had (Index 2026 design, vol2 until 3.11.2026):
 *
 *   radius    18px on cards, photos and boxes
 *   buttons   small uppercase letter-spaced text on every button and text
 *             link button; buttons are pills that lift on hover, text links
 *             (btn-no-bg) keep their underline and no pill
 *   cover     image covers darken from the left in navy (subpages, text on
 *             the left); the centered front page cover darkens towards the
 *             bottom and lightly at the top
 *   photos    text-image photos get the same radius
 *   forms     fields in the peach boxes (contact, newsletter) are white with
 *             navy text, as on the old site
 *   light-surface  a white card inside a dark or peach section with the base
 *             colors inside (the audience pages' article lift, Kohderyhmäsivu A)
 *   article-lift   that lift's photo zooms in a little on hover
 *   header    20px wordmark (40px image box with GP's 10px padding), 15px
 *             menu from 990px; the language link is the EN quick link on
 *             desktop and the "In English" menu item (class kielilinkki) in
 *             the mobile slide-out menu, never both
 */

:root {
    --index-radius: 18px;
    --card-radius: var(--index-radius);
    --post-item-radius: var(--index-radius);
    --team-radius: var(--index-radius);
    --accordion-radius: var(--index-radius);
    --cta-banner-radius: var(--index-radius);
    --next-step-radius: var(--index-radius);
    --article-highlight-radius: var(--index-radius);
    --gallery-radius: var(--index-radius);
    --cover-inset-radius: var(--index-radius);
    --button-padding: 0.95em 2.1em;
}

/* ---------- Buttons ---------- */
/* Every button and text link button speaks the same small uppercase. */
a.gb-button:not(.card-link),
input[type="submit"],
.wpforms-container button[type="submit"] {
    font-family: var(--title-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

/* The pill; text links (btn-no-bg) have none, the radius would clip the
   first letter of their underline animation. */
a.gb-button:not(.btn-no-bg, .card-link),
input[type="submit"],
.wpforms-container button[type="submit"] {
    border-radius: 999px;
}

a.gb-button:not(.btn-no-bg, .card-link):hover {
    transform: translateY(-2px);
}

/* ---------- Cover ---------- */
.cover--image {
    --cover-overlay: linear-gradient(90deg,
        color-mix(in srgb, var(--navy) 82%, transparent) 0%,
        color-mix(in srgb, var(--navy) 62%, transparent) 45%,
        color-mix(in srgb, var(--navy) 12%, transparent) 100%);
}

.cover--image.cover--center {
    --cover-overlay: linear-gradient(180deg,
        color-mix(in srgb, var(--on-image-clr) 25%, transparent) 0%,
        transparent 25%,
        transparent 50%,
        var(--overlay-clr) 100%);
}

/* Article cards that paint a palette (the front page's "Pinnalla nyt" row)
   round the whole card, not only the photo. */
.post-item.wrapper-extra-color,
.post-item.wrapper-alternate-color {
    border-radius: var(--post-item-radius);
}

/* Front page hero, "Pinnalla nyt": on desktop the three cards share the row
   evenly, edge to edge with the heading and link above, so the row sits centred
   and does not scroll. On phones and tablets it stays a scroller. */
@media only screen and (min-width: 990px) {
    .cover-row .post-list--carousel .gb-grid-wrapper > .gb-grid-column {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }
}

/* Article title: Index's titles are long sentences, so the article header uses
   a size of its own instead of the page h1 (up to 96px). Person pages keep it. */
.single-post .post-title {
    font-size: clamp(30px, 1.2rem + 1.9vw, 48px);
}

/* Archive: the newest article (post-list--featured) on a panel of its own, so
   it stands apart from the grid. The banner keeps its 2:1 shape, because the
   title is part of the image. */
body:not(.paged) .post-list--featured .gb-grid-wrapper > .gb-grid-column:first-child > .post-item {
    padding: 20px;
    border-radius: var(--post-item-radius);
    background-color: var(--neutral-clr);
}

@media only screen and (min-width: 768px) {
    body:not(.paged) .post-list--featured .gb-grid-wrapper > .gb-grid-column:first-child > .post-item {
        padding: 40px;
        align-items: center;
    }

    body:not(.paged) .post-list--featured .gb-grid-wrapper > .gb-grid-column:first-child > .post-item > figure.gb-block-image {
        align-self: center;
        aspect-ratio: var(--post-item-ratio);
        min-height: 0;
    }
}

/* ---------- Photos ---------- */
.text-image:not(.text-image--wide) .text-image-media figure {
    border-radius: var(--index-radius);
    overflow: clip;
}

/* ---------- Forms in peach boxes ---------- */
.wrapper-extra-color :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], textarea, select) {
    background-color: var(--body-bg-clr);
    border-color: var(--body-bg-clr);
    color: var(--navy);
}

.wrapper-extra-color ::placeholder {
    color: color-mix(in srgb, var(--navy) 55%, transparent);
}

/* The help text under a field (the newsletter consent line) sits on the peach
   background, not in a white field: the palette's text color, not the grey
   placeholder color forms.css gives it. */
.wrapper-extra-color .wpforms-container .wpforms-field-description {
    color: var(--font-clr);
}

/* ---------- Header ---------- */
.site-header .header-image,
.navigation-branding img,
.site-logo.mobile-header-logo img {
    height: 40px;
}

#mobile-header .quick-link,
.main-navigation:not(.slideout-navigation) .menu-item.kielilinkki {
    display: none;
}

.slideout-navigation .menu-item.kielilinkki > a {
    font-size: 0.85em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media only screen and (min-width: 990px) {
    :root {
        --nav-font-size: 15px;
    }
}

/* Wide screens: the menu at 18px (Arto 5.11.2026) */
@media only screen and (min-width: 1280px) {
    :root {
        --nav-font-size: 18px;
    }
}

/* ---------- Light surface and article lift ---------- */
/* (0,2,0) and later than base.css, so it wins over the rule that unsets
   nested backgrounds inside a palette wrapper. */
.gb-container.light-surface {
    --bg-clr: var(--body-bg-clr);
    --font-clr: var(--navy);
    --heading-clr: var(--navy);
    --link-clr: var(--navy);
    --link-hover-clr: var(--navy);
    --no-bg-btn-clr: var(--navy);
    --no-bg-btn-hover-clr: var(--navy);
    background-color: var(--bg-clr);
    color: var(--font-clr);
    overflow: clip;
}

.light-surface h3 a {
    text-decoration: none;
}

.article-lift figure.gb-block-image {
    margin: 0;
    height: 100%;
    overflow: clip;
}

.article-lift figure.gb-block-image img {
    display: block;
    min-height: 100%;
    transition: transform 1.2s var(--transition-timing-function);
}

.article-lift:hover figure.gb-block-image img {
    transform: scale(1.04);
}
