/**
 * Brand: the typographic voice of PPL Logistiikka (look 2 "Paikka", heavy,
 * blue). Rules that the variable files cannot express: uppercase condensed
 * headings, mono labels, square buttons. Colors come from colors.css, fonts
 * and sizes from typography.css. Brand elements (corner frame, tape, status
 * mark) are blocks in css/blocks/.
 *
 * Source of truth for the brand: brandi-2/brandi.md in the project folder.
 */

body {
    line-height: var(--base-line-height);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    text-transform: uppercase;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

/* On a phone a long Finnish compound that does not fit the row breaks at a
   syllable instead of mid-word. Wider screens never hyphenate a heading. */
h1, h2, h3 {
    hyphens: auto;
    hyphenate-limit-chars: 14 6 6;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    h1, h2, h3 {
        hyphens: manual;
    }
}

h1 {
    font-weight: var(--heading-weight-large);
    line-height: 0.9;
    letter-spacing: 0.005em;
}

/* The emphasised word of a heading takes the color of action */
h1 em {
    font-style: normal;
    color: var(--link-clr);
}

p {
    text-wrap: pretty;
}

/* Eyebrow above a heading: mono label with a square marker */
.sub-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-family: var(--code-font);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--font-clr);
}

.sub-heading::before {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    background: var(--accent-clr);
}

/* Buttons: condensed uppercase, square corners */
a.gb-button,
button,
input[type="submit"] {
    border-radius: 0;
    font-family: var(--title-font);
    font-weight: var(--heading-weight);
    font-size: 1.05em;
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Text link: mono label */
.gb-button.btn-no-bg {
    font-family: var(--code-font);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.main-navigation .main-nav ul li a {
    font-family: var(--title-font);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

:focus-visible {
    outline: 2px solid var(--link-clr);
    outline-offset: 2px;
}

/* Articles: the headings are not written for the display size (long compound
   words), so the h1 is smaller and may hyphenate at every width */
.single-post h1,
.blog h1,
.archive h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.8rem);
    line-height: 0.95;
    hyphens: auto;
}

/* Articles: square corners on the list images, as everywhere on this site */
.post-list,
.post-item {
    --post-item-radius: 0;
}
