/**
 * Page hero: the top section of a page on the white palette. Text on the
 * left (eyebrow, h1, lead, buttons, an optional quote), a side panel on the
 * right (key figures in a ruled 2 x 2 box on the front page, the fact card
 * on a service page) and an image pair below. No media behind the text: the
 * brand does not set text on images. Project block (PPL Logistiikka).
 *
 * globalClass: page-hero   on the section (.color-section)
 *
 * Structure:
 *   .color-section.page-hero.gb-container.alignfull
 *     .gb-container (inner, max width)
 *       .page-hero-grid.gb-container
 *         .page-hero-text.gb-container    p.sub-heading, h1, p.page-hero-lead,
 *                                         buttons, p.page-hero-quote > b + span
 *         side panel                      .numbers.numbers--box, or .fact-strip--card
 *       .image-pair
 *
 * page-hero--text: heading and lead only (Meistä, Referenssit, Yhteystiedot).
 * page-hero--long: smaller h1 for a long heading next to the fact card.
 * p.page-hero-proof: one bold line of proof under the buttons.
 *
 * numbers--box: the base numbers block as a 2 x 2 box with hairlines, left
 * aligned, figures in the heading color.
 *
 * Chain animations: text parts 1-4, side panel 5, image pair 6.
 */

.gb-container.color-section.page-hero {
    padding-top: clamp(36px, 5vw, 64px);
}

.page-hero-grid {
    display: grid;
    gap: 32px;
    align-items: start;
}

.page-hero-grid > .block-editor-inner-blocks,
.page-hero-grid > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: contents;
}

.page-hero h1 {
    margin: 4px 0 0;
}

.page-hero-lead {
    max-width: 40ch;
    margin: 18px 0 0;
    font-size: 1.15em;
    line-height: 1.45;
}

.page-hero-quote {
    max-width: 46ch;
    margin: 26px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--border-clr);
    font-size: 0.95em;
    line-height: 1.4;
}

.page-hero-quote b {
    font-weight: 700;
    color: var(--heading-clr);
}

.page-hero-quote span {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
}

.page-hero .image-pair {
    margin-top: clamp(32px, 4vw, 56px);
}

/* A long h1 next to a fact card (service pages): smaller, so the last row
   does not run under the card or off a phone screen. The 10vw cap and the
   4.3rem ceiling keep the longest word (Varastointipalvelut) on one row. */
.page-hero--long h1 {
    font-size: min(10vw, clamp(2.1rem, 5.2vw, 4.3rem));
    line-height: 0.98;
}

/* page-hero--text: the top of a text page (no side panel, no images) */
.gb-container.color-section.page-hero--text {
    padding-bottom: clamp(40px, 5vw, 72px);
}

.page-hero--text .page-hero-lead {
    max-width: 56ch;
}

.page-hero-proof {
    margin: 18px 0 0;
    font-size: 0.8em;
    font-weight: 700;
}

/* The base fact card (fact-strip--card) in the brand's voice */
.page-hero .fact-strip--card {
    padding: clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 28px) 8px;
    border: 1px solid var(--border-clr);
    border-radius: 0;
    background-color: var(--neutral-clr);
}

.page-hero .fact-strip-title,
.page-hero .fact-strip-label {
    font-family: var(--code-font);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-hero .fact-strip-title {
    font-size: 12px;
    color: var(--link-clr);
}

.page-hero .fact-strip-label {
    font-size: 11px;
}

.page-hero .fact-strip-value {
    font-size: 0.92em;
    font-weight: 600;
    line-height: 1.4;
}

.page-hero .fact-strip-value small {
    display: block;
    margin-top: 2px;
    font-size: 0.9em;
    font-weight: 400;
}

/* ---- Key figures as a ruled box ---- */
.numbers.numbers--box {
    --number-value-size: clamp(2.4rem, 3.6vw, 3.2rem);
    --number-value-clr: var(--heading-clr);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    border: 1px solid var(--border-clr);
    background-color: var(--border-clr);
}

.numbers--box > .block-editor-inner-blocks,
.numbers--box > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: contents;
}

.numbers--box .number {
    padding: clamp(16px, 2vw, 24px);
    background-color: var(--bg-clr);
    text-align: left;
}

.numbers--box .number-value {
    font-weight: var(--heading-weight-large);
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.numbers--box .number-label {
    margin-top: 10px;
    font-family: var(--main-font);
    font-size: 0.95em;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}

.numbers--box .number-text {
    margin-top: 4px;
    font-size: 0.82em;
}

@media (min-width: 990px) {
    .page-hero-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: 56px;
    }
}

/* Large screens: more air around the heading and before the images */
@media (min-width: 1280px) {
    .gb-container.color-section.page-hero {
        padding-top: clamp(64px, 6vw, 112px);
    }

    .page-hero-grid {
        gap: clamp(72px, 7vw, 120px);
        align-items: center;
    }

    .page-hero-lead {
        margin-top: 28px;
    }

    .page-hero-quote {
        margin-top: 40px;
        padding-top: 22px;
    }

    .page-hero .image-pair {
        margin-top: clamp(72px, 6vw, 112px);
    }

    .numbers--box .number {
        padding: clamp(24px, 2.2vw, 36px);
    }
}

/* The image-pair frame starts 14px outside its figure before it settles; on
   a 320px screen that reaches past the viewport for a moment */
.gb-container.page-hero {
    overflow-x: clip;
}
