/* Typography for the whole site: one font (Inter), text colours and sizes.
   Loaded in the page head right after base.css. Section stylesheets load later, in the page body,
   so every rule here starts with "body" to make sure it wins over them.

   The font file is stored on this host (fonts/inter/InterVariable.woff2, from https://rsms.me/inter/,
   SIL Open Font License). No outside service is contacted to show it. */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/InterVariable.woff2') format('woff2');
}

/* One font for all text. Icon fonts are left alone. */
body,
body *:not(.fa):not([class*="fa-"]):not([class^="icon-"]):not([class*=" icon-"]):not(.lg-icon):not([class*="swiper-button"]):not(.sl-flag) {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

/* Text colours: darker body text, soft-black headings. */
body {
    color: #4a5560;
    font-size: 17px;
    line-height: 1.7;
}

body h1,
body h2,
body h3 {
    color: #101c26;
}

/* Section headings: light with a bold word, a little smaller and less squeezed than before. */
body h2 {
    letter-spacing: -0.02em;
    line-height: 1.15;
}

@media all and (min-width: 720px) {
    /* Not the small headings of the dark quote block and the Contact block: those keep their own size. */
    body .zone-wrapper:not(.zone-cta-wrapper):not(.zone-info-wrapper) .zone .region .region-inner > h2 {
        font-size: 40px;
    }
}

/* Section intro paragraphs */
body .zone .region .region-inner > p,
body .what-we-offer .zone .region .region-inner p.wwo-lead,
body .how-it-works .zone .region .region-inner p {
    font-size: 17px;
    line-height: 1.7;
    /* no colour here: paragraphs take the body colour, and blocks on a dark background keep their own light text */
}

/* Banner */
body .zone-banner-wrapper h1 {
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
}

body .zone-banner-wrapper .caption p {
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Buttons: medium weight and a little letter spacing so capitals read cleanly. */
body .button,
body a.button,
body input.button-form-blue {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
}

/* How It Works cards */
body .flipbox-heading {
    font-weight: 700;
    letter-spacing: 0.04em;
}

body .flipbox-subheading {
    color: #c3d0da;
    letter-spacing: 0;
}

body .flipbox-subheading-b {
    letter-spacing: 0;
}

@media screen and (min-width: 721px) {
    body .flipbox-subheading {
        font-size: 17px;
        line-height: 23px;
    }

    body .flipbox-subheading-b {
        font-size: 16px;
        line-height: 24px;
    }
}

/* Gallery filter */
body .isotope-filter-wrapper .btn {
    font-weight: 600;
}

/* Section tabs. The size applies on wide screens only, so the smaller tablet size set in
   sticky-nav.css still takes effect and all the tabs fit on one row. */
body .sticky-nav ul.nav li {
    font-weight: 500;
}

@media all and (min-width: 1101px) {
    body .sticky-nav ul.nav li {
        font-size: 14px;
    }
}

/* A section that receives focus after a tab is clicked shows no outline box. */
body [tabindex="-1"]:focus {
    outline: none;
}

/* Contact */
body .zone-info-wrapper h2 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ---------- Readability of the yellow ---------- */

/* Yellow buttons: navy text. White on yellow was too faint to read comfortably. */
body .button,
body a.button,
body .button:hover,
body a.button:hover,
body a.button:focus,
body input.button-form-blue,
body .button-form-blue.w-button:hover,
body .button.w-button:hover {
    color: #003F63;
}

/* The navy buttons (About Us, Get a Quote in the Contact block) keep white text. */
body .zone-intro-wrapper .button,
body .zone-intro-wrapper .button:hover,
body .zone-intro-wrapper .button:focus,
body .zone-info-wrapper .button,
body .zone-info-wrapper .button:hover,
body .zone-info-wrapper .button:focus {
    color: #fff;
}

/* The yellow phone button in the top menu (tablet and desktop). */
@media all and (min-width: 720px) {
    body .iwd-menu .ribbon-wrapper ul.ribbon > li.last > a,
    body .iwd-menu .ribbon-wrapper ul.ribbon > li.last > a:hover {
        color: #003F63;
    }
}

/* Links on a light background (phone, email, Privacy Policy): navy text with a yellow underline.
   Yellow text on the light page was too faint. */
body .zone-info-wrapper p a,
body .section-footer .copyright a {
    color: #003F63;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #F2B138;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

body .zone-info-wrapper p a:hover,
body .zone-info-wrapper p a:focus,
body .section-footer .copyright a:hover,
body .section-footer .copyright a:focus {
    color: #002f4a;
    text-decoration: underline;
    text-decoration-color: #003F63;
}

/* How It Works cards, yellow back side: navy text. White on yellow was too faint for a full sentence. */
body .panel .back .flipbox-heading,
body .panel .back .flipbox-subheading-b,
body .panel .back .bold {
    color: #003F63;
}

body .panel .back .flipbox-subheading-b {
    font-weight: 500;
}

body .panel .back .bold {
    font-weight: 700;
}

/* The "form" link on the first card: underlined so it still reads as a link. */
body .panel .back .link,
body .panel .back .link:hover,
body .panel .back .link:focus {
    color: #003F63;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body .panel .back .link:hover,
body .panel .back .link:focus {
    color: #002f4a;
}

/* ---------- Text layout: one line length and one rhythm ---------- */

/* Headings break into even lines instead of leaving one word alone on the last line. */
body h1,
body h2,
body h3 {
    text-wrap: balance;
}

/* The intro paragraph under a section heading: the same size, line length and gaps everywhere.
   About 75 characters per line. Before, these were 16, 17 or 18px and up to 93 characters wide.
   Not the dark quote block, the Contact block or the footer, which have their own layout. */
body .zone-wrapper:not(.zone-cta-wrapper):not(.zone-info-wrapper):not(.zone-footer-wrapper) .zone .region .region-inner > p:not(.glass-gallery-note),
body .what-we-offer .zone .region .region-inner p.wwo-lead,
body .how-it-works .zone .region .region-inner p {
    font-size: 17px;
    line-height: 1.7;
    max-width: 620px;
    margin: 18px auto 26px;
    text-wrap: pretty;
}

/* Contact block and the note on How to Measure: no more lines running the full width of the page. */
body .zone-info-wrapper .caption p {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

body .region-inner-note {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* Glass pages, "What we install" cards: wide enough to read. Five cards sat in one row with
   about 16 characters per line. Widths are shares of the row, so the rows always come out even:
   computer: four cards in one row, five as three and two
   tablet:   four cards as two and two, five as three and two
   phone:    one card per row */
body.glass-page .glass-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

body.glass-page .glass-options li {
    flex: 0 1 calc((100% - 60px) / 4);
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

body.glass-page .glass-options li:first-child:nth-last-child(n+5),
body.glass-page .glass-options li:first-child:nth-last-child(n+5) ~ li {
    flex-basis: calc((100% - 40px) / 3);
}

@media all and (min-width: 720px) and (max-width: 979px) {
    body.glass-page .glass-options li {
        flex-basis: calc((100% - 20px) / 2);
    }

    body.glass-page .glass-options li:first-child:nth-last-child(n+5),
    body.glass-page .glass-options li:first-child:nth-last-child(n+5) ~ li {
        flex-basis: calc((100% - 40px) / 3);
    }
}

@media all and (max-width: 719px) {
    body.glass-page .glass-options li,
    body.glass-page .glass-options li:first-child:nth-last-child(n+5),
    body.glass-page .glass-options li:first-child:nth-last-child(n+5) ~ li {
        flex: 1 1 100%;
    }
}

/* FAQ page "see all" links: the light blue was too pale on white (3.0 to 1); this blue passes. */
body a.faq-btn,
body a.faq-btn strong {
    color: #0b67a3;
}

body a.faq-btn:hover,
body a.faq-btn:hover strong {
    color: #101c26;
}
