/* HTML tag */

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.3;
    text-align: left;
    font-family: var(--font-title);
    color: var(--blue-dark);
    font-weight: 700;
}

/* Fluid font sizes: min at 375px viewport, max (desktop size) from 640px, see doc/design/typography.md */

/* Swiss heading style "Rule & Notch": left-aligned heavy title opened by a thick navy rule */
h1 {
    padding-top: 2rem;
    border-top: 10px solid var(--blue-dark);
    font-size: clamp(3.6rem, 1.9rem + 4.53vw, 4.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

/* Line under a heading: compH1Subtitle, compHeadingStar */
.heading-subtitle {
    font-size: clamp(1.8rem, 1.52rem + 0.75vw, 2rem);
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    color: var(--grey-blue-dark);

    & a {
        color: var(--blue-dark);
        border-bottom: 2px solid var(--blue-light);
    }
}

/* compH1Subtitle: light navy lead, weight contrast with the 800 h1 */
.heading-lead {
    font-size: clamp(2rem, 1.58rem + 1.13vw, 2.3rem);
    font-weight: 300;
    line-height: 1.4;
    letter-spacing: -0.005em;
    color: var(--blue-dark);

    & a {
        font-weight: 500;
    }
}

/* compHeadingStar: section title framed by two blue stars */
.heading-star {
    font-size: clamp(1.8rem, 1.38rem + 1.13vw, 2.1rem);

    & > div {
        color: var(--blue);
    }

    & h3 {
        font-size: clamp(2.1rem, 1.53rem + 1.51vw, 2.5rem);
        font-weight: 800;
        line-height: 1.2;
        letter-spacing: -0.015em;
    }
}

/* Personalized class */

/* Section heading (compHeadingDivider, h2.heading-section): navy rule with a blue notch on its left end */
.heading-divider,
h2.heading-section {
    position: relative;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid var(--blue-dark);

    &::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -5px;
        width: 56px;
        height: 8px;
        background-color: var(--blue-light);
    }
}

.heading-divider > *,
h2.heading-section {
    font-size: clamp(2.6rem, 1.61rem + 2.64vw, 3.3rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

h2.heading-section {
    margin-bottom: 3.5rem;
}

.heading-underlined-blue-dark {
    margin-top: 3rem;
    margin-bottom: 0.25rem;
    text-align: center;
    font-family: var(--font-title);
    font-size: 2.7rem;
    font-weight: 600;
    color: var(--blue-dark);
    border-bottom: 2px solid var(--blue-dark);
}

/* Sub-section heading */
h3.heading-section,
h4.heading-section {
    margin-bottom: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.015em;

    &[data-step]::before {
        content: attr(data-step) ". ";
    }
}

h3.heading-section,
h4.heading-section,
.heading-h3 {
    font-size: clamp(1.9rem, 1.33rem + 1.51vw, 2.3rem);
}
