/* blockflow.css

   The framework stylesheet: browser normalisation, the WordPress output
   classes, and BlockFlow's own base styles. One of two stylesheets in the
   theme, the other being style.css, which holds everything site specific and
   loads after this file and after the per-block stylesheets.

   The normalisation here is normalize.css v8.0.1 with everything removed that
   only ever targeted IE 10/11 and legacy Edge, and without normalize's
   line-height, so the site decides its own typography. */


/* document
   ========================================================================= */

html {
    box-sizing: border-box;

    /* only show the scrollbar when needed, but keep its space reserved */
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;

    scroll-behavior: smooth;

    /* keep iOS from inflating text when the phone turns to landscape */
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    overflow-x: hidden;

    /* a long word or a pasted url should never blow out a layout */
    overflow-wrap: break-word;
}


/* text level
   ========================================================================= */

/* without this, sub and sup stretch the line they sit on */
sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

/* the repeated keyword is the actual fix for the inherited font-size bug */
code,
kbd,
samp,
pre {
    font-family: monospace, monospace;
    font-size: 1em;
}

table {
    border-collapse: collapse;
}


/* elements
   ========================================================================= */

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

a {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

/* BlockFlow's own blocks fill their explicitly sized containers by default */
.block img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* except the two blocks that render markup BlockFlow does not own, which keep
   native image sizing */
.block-contents img,
.block-woocommercecontents img {
    height: auto;
    width: auto;
    object-fit: unset;
}


/* forms
   ========================================================================= */

/* form controls do not inherit the page font on their own */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    margin: 0;
}

button {
    cursor: pointer;
}

/* Safari and iOS refuse to style these without it */
button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}


/* transitions
   ========================================================================= */

body {
    &.scrolled {
        *:not(.slick-track):not(.slick-list) {
            transition: var(--transition-all);
        }
    }

    *:hover,
    *:hover::before,
    *:hover::after {
        transition: var(--transition-all);
    }
}


/* accessibility
   ========================================================================= */

/* a visible ring for keyboard users, without one on every mouse click */
:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* honour a reader who asked for less movement: this cancels the smooth
   scrolling and the site-wide transitions set above */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* hidden stays hidden, even where a display rule would otherwise win */
[hidden] {
    display: none !important;
}

/* visible to screen readers only */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #eee;
    clip: auto !important;
    clip-path: none;
    color: #444;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}


/* wordpress output classes
   =========================================================================
   Only reachable through the blocks that render WordPress' own markup, so
   contents and woocommercecontents. Kept because the moment a project enables
   the editor or a plugin prints an aligned image, these are needed. */

.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.wp-caption {
    max-width: 96%;
    text-align: center;
}

.wp-caption img {
    height: auto;
    margin: 0;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    margin: 0;
    padding: 0 4px 5px;
    font-size: 0.8em;
}
