/**
 * Brand sections: layout pieces the front page and the service pages share.
 * Project styles (PPL Logistiikka). Each is a class on a GB block.
 *
 * section-head         heading block of a section (p.sub-heading, h2,
 *                      optional p), max 760px
 * section-head--row    from 990px the heading on the left and the intro
 *                      paragraph on the right, bottoms aligned
 * two-col              two equal columns from 990px
 * numbers--ruled       the base numbers block with a rule above each figure,
 *                      left aligned, four in a row from 990px (numbers--pair:
 *                      two, numbers--three: three, e.g. years of a history)
 * owner                the dark "Omistaja vastaa" section: video on the left
 *                      (base video block, square play label in the corner),
 *                      .person-card below it (.person-card-photo +
 *                      .person-card-text), text on the right
 * quote-block          p.quote-main, p.quote-secondary, p.quote-name,
 *                      p.quote-role: a customer quote without a card
 * logos--grid          the base logos block as a 3-column grid of boxes;
 *                      p.logo-text is a name set in type when there is no file
 * section-note         a row under a section: a lead (p.section-note-lead), a
 *                      note and a button
 * address              p.address > b (street) + rest
 * map-placeholder      box that holds the map embed
 * card--ruled          plain card with a rule on top
 * section-footnote     paragraph under a section, above a hairline
 * photo-box            container whose image fills a 4:3 box
 * stat                 p.stat-value + p.stat-label: one figure under a photo;
 *                      add numbers--countup and number-value to count it up
 * logos--strip         with logos--grid: six boxes in a row from 990px
 * price-rows           .price-row > h3 + p.card-price + p
 * contact-ways         the closing section: the form panel and two side
 *                      panels (.contact-way), p.contact-way-number is the
 *                      phone number in display size
 */

.section-head {
    max-width: 760px;
    margin-bottom: clamp(24px, 3.6vw, 44px);
}

.section-head p:not(.sub-heading) {
    margin-top: 16px;
    font-size: 1.05em;
}

.section-head--row {
    display: grid;
    gap: 12px 48px;
    align-items: end;
    max-width: none;
}

.section-head--row > p:not(.sub-heading) {
    margin-top: 0;
}

.two-col {
    display: grid;
    gap: 32px;
    align-items: start;
}

.section-head--row > .block-editor-inner-blocks,
.section-head--row > .block-editor-inner-blocks > .block-editor-block-list__layout,
.two-col > .block-editor-inner-blocks,
.two-col > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: contents;
}

/* ---- Figures with a rule ---- */
.numbers.numbers--ruled {
    --number-value-size: clamp(2rem, 3.4vw, 2.8rem);
    --number-value-clr: var(--heading-clr);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.numbers--ruled .number {
    padding-top: 16px;
    border-top: 3px solid var(--heading-clr);
    text-align: left;
}

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

.numbers--ruled .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--ruled .number-text {
    margin-top: 4px;
    font-size: 0.82em;
}

/* numbers--pair and numbers--three keep two or three figures on a row */
.numbers.numbers--ruled.numbers--three {
    grid-template-columns: 1fr;
}

/* ---- Owner ---- */
.owner h2 {
    font-size: clamp(2.8rem, 5.4vw, 4.6rem);
    font-weight: var(--heading-weight-large);
    line-height: 1;
}

.owner .video-player a.gb-button.video-play {
    left: 0;
    top: auto;
    bottom: 0;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 1.05rem;
    white-space: normal;
}

.owner .video-caption {
    text-align: left;
}

.owner-statement {
    font-size: 1.15em;
    font-weight: 600;
    color: var(--heading-clr);
}

.person-card {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-clr);
    font-size: 0.95em;
}

/* The photo owns a square box */
.gb-container.person-card-photo {
    position: relative;
    flex: none;
    width: 96px;
    aspect-ratio: 1;
    overflow: clip;
}

.person-card-photo figure {
    margin: 0;
}

.person-card-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.person-card-text > * {
    margin: 0;
}

.person-card-name {
    font-weight: 700;
    color: var(--heading-clr);
}

/* person-card--large: the contact page's main card */
.person-card.person-card--large {
    align-items: flex-start;
    margin-top: 8px;
    padding-top: 0;
    border-top: 0;
    font-size: 1em;
}

.person-card--large .person-card-photo {
    width: 140px;
}

.person-card--large .contact-way-number {
    margin: 8px 0;
    font-family: var(--title-font);
    font-size: 2.4em;
    font-weight: var(--heading-weight-large);
    line-height: 1;
}

.person-card--large .contact-way-number a {
    color: var(--heading-clr);
    text-decoration: none;
}

/* ---- Quote ---- */
.quote-block > p {
    margin-bottom: 0;
}

.quote-main {
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--heading-clr);
}

.quote-secondary {
    margin-top: 18px;
    font-size: 0.95em;
    font-style: italic;
}

.quote-name {
    margin-top: 22px;
    font-weight: 700;
    color: var(--heading-clr);
}

.quote-role {
    font-size: 0.85em;
}

/* ---- Logos as a grid of boxes ---- */
.logos.logos--grid {
    --logos-height: 44px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

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

.logos--grid figure,
.logos--grid .logo-text {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--border-clr);
    background: var(--body-bg-clr);
}

.logos--grid img {
    max-width: 100%;
    mix-blend-mode: multiply;
}

.logos--grid .logo-text {
    font-family: var(--title-font);
    font-size: 1.15em;
    font-weight: var(--heading-weight);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--heading-clr);
}

/* ---- Note row, address, map ---- */
.section-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    margin-top: 28px;
    font-size: 0.9em;
}

.section-note > * {
    margin: 0;
}

.section-note p {
    margin: 0;
}

.section-note .section-note-lead {
    margin-bottom: 4px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--heading-clr);
}

.address b {
    display: block;
    font-weight: 700;
    color: var(--heading-clr);
}

.map-placeholder {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    padding: 24px;
    border: 2px dashed var(--border-clr);
    text-align: center;
    font-size: 0.85em;
}

/* ---- Service page pieces ---- */
/* card--ruled: a plain card with a rule on top (the "do you recognise this" row) */
.cards .card.card--ruled {
    padding: 18px 0 0;
    border: 0;
    border-top: 3px solid var(--heading-clr);
    background: none;
}

.card--ruled h3 {
    font-size: var(--h3-size);
}

.section-footnote {
    max-width: 76ch;
    margin-top: clamp(28px, 4vw, 44px);
    padding-top: 22px;
    border-top: 1px solid var(--border-clr);
    font-size: 0.95em;
}

.section-footnote b {
    font-weight: 700;
    color: var(--heading-clr);
}

.section-lead {
    margin-top: 16px;
    font-size: 1.05em;
}

/* A framed photo that owns its box */
.gb-container.photo-box {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: clip;
}

.photo-box figure {
    margin: 0;
}

.photo-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-clr);
}

.stat > * {
    margin: 0;
}

/* With numbers--countup on the .stat and number-value on the figure, the base
   counter (js/blocks/numbers.js) counts it up; these rules keep the stat's look. */
.stat .stat-value {
    font-family: var(--title-font);
    font-size: clamp(2.4rem, 3.6vw, 3.2rem);
    font-weight: var(--heading-weight-large);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--heading-clr);
}

.stat-label {
    font-size: 0.85em;
}

/* logos--strip: the logo boxes in one row from 990px (under a story) */
.logos.logos--grid.logos--strip {
    margin-top: clamp(32px, 4vw, 56px);
}

/* On ink the boxes stay light so dark logos read */
.wrapper-alternate-color .logos--grid figure {
    background: var(--font-clr);
}

/* price-rows: one row per price line */
.price-rows {
    border-top: 3px solid var(--heading-clr);
}

.price-rows .price-row {
    display: grid;
    gap: 6px 32px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-clr);
}

.price-row > * {
    margin: 0;
}

.price-row h3 {
    font-size: 1.25em;
}

.price-row p:last-child {
    font-size: 0.95em;
}

.price-examples {
    margin-top: 24px;
}

/* ---- Contact ways ---- */
.contact-ways {
    display: grid;
    gap: 20px;
    align-items: start;
}

.contact-ways > .block-editor-inner-blocks,
.contact-ways > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: contents;
}

.contact-ways-side {
    display: grid;
    gap: 20px;
}

.contact-ways .contact-way {
    padding: clamp(22px, 2.8vw, 34px);
    border: 1px solid var(--border-clr);
    background-color: var(--neutral-clr);
}

.contact-way h3 {
    font-size: 1.7em;
}

.contact-way p {
    margin: 8px 0 0;
    font-size: 0.95em;
}

.contact-way .contact-way-number {
    margin-top: 12px;
    font-family: var(--title-font);
    font-size: 2.4em;
    font-weight: var(--heading-weight-large);
    line-height: 1;
}

.contact-way-number a {
    color: var(--heading-clr);
    text-decoration: none;
}

.contact-way-number a:hover {
    color: var(--link-clr);
}

@media (min-width: 768px) {
    .logos.logos--grid {
        --logos-height: 52px;
    }
}

@media (min-width: 990px) {
    .logos.logos--grid.logos--strip {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .price-rows .price-row {
        grid-template-columns: 1fr 1.2fr 1.6fr;
    }

    .section-head--row {
        grid-template-columns: 1fr 1fr;
    }

    .two-col {
        grid-template-columns: 1fr 1fr;
        gap: 56px;
    }

    .numbers.numbers--ruled {
        grid-template-columns: repeat(4, 1fr);
    }

    .numbers.numbers--ruled.numbers--pair {
        grid-template-columns: 1fr 1fr;
    }

    .numbers.numbers--ruled.numbers--three {
        grid-template-columns: repeat(3, 1fr);
    }

    .logos.logos--grid.logos--four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .contact-ways {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    }
}

/* Large screens: more air between the heading and the content */
@media (min-width: 1280px) {
    .section-head {
        margin-bottom: clamp(44px, 4vw, 64px);
    }

    .two-col {
        gap: clamp(72px, 7vw, 112px);
    }
}
