/*
 * thebrickman.co.uk: the look of the old "TheBrickMan" WordPress theme
 * (Moving Up Media, 2012), rebuilt without its background images where CSS
 * can draw the same thing, and made to fit narrow screens.
 * No inline styles or scripts anywhere: the Content-Security-Policy blocks them.
 */

:root {
    --orange: #ff9201;
    --orange-light: #faa435;
    --page: #e7e7e7;
    --text: #333;
    --muted: #666;
    --menu-top: #4a4a4a;
    --menu-bottom: #343434;
    --footer-below: #9b9b9b;
    --border: #e3e3e3;
    --error: #c00;
    --gutter-left: 8px;   /* the old theme drew its white column from 8 px to 1008 px */
    --gutter-right: 12px; /* of the 1020 px page (grey edges in its background images) */
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font: 14px/1.7 Arial, Helvetica, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

a {
    color: var(--muted);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 8px 12px;
    background: #fff;
    color: var(--text);
}

.skip-link:focus {
    left: 8px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---- Page frame ---------------------------------------------------------- */

.page {
    max-width: 1020px;
    margin: 0 auto;
}

.site-header {
    background: #fff;
}

.site-header a,
.site-header img {
    display: block;
}

/* ---- Menu ------------------------------------------------------------------ */

.site-nav {
    position: relative;
    z-index: 100;
    margin: 0 var(--gutter-right) 0 var(--gutter-left);
    padding: 6px 12px 6px 32px;
    background: linear-gradient(var(--menu-top) 0 50%, var(--menu-bottom) 50% 100%);
    font-size: 13px;
    font-weight: bold;
    line-height: 1.4;
}

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

.site-nav > ul {
    display: flex;
    flex-wrap: wrap;
    column-gap: 20px;
    row-gap: 4px;
}

.site-nav li {
    position: relative;
}

.site-nav a {
    color: #fff;
}

.site-nav a[aria-current="page"] {
    text-decoration: underline;
}

/* The Products drop-down: shown on hover and while a link in it has keyboard focus. */
.site-nav li ul {
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 4px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s, visibility 0.15s;
}

.site-nav li:hover > ul,
.site-nav li:focus-within > ul {
    visibility: visible;
    opacity: 1;
}

.site-nav li ul a {
    display: block;
    width: 200px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-top: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #555;
    font-weight: normal;
    line-height: 1;
}

.site-nav li ul a:hover,
.site-nav li ul a:focus-visible {
    background: var(--muted);
    color: #fff;
    text-decoration: none;
}

/* ---- Home: slider, product boxes, text ------------------------------------ */

.slider {
    position: relative;
    margin: 0 var(--gutter-right) 12px var(--gutter-left);
    aspect-ratio: 1000 / 270;
    overflow: hidden;
    background: #fff;
}

.slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: slide 49s infinite;
}

/* Seven slides of 7 seconds (as the Nivo Slider had), each fading in over 0.5 s on top of the
   one before; the first stays underneath, so it shows again when the seventh fades out. */
.slider img:first-child {
    opacity: 1;
    animation: none;
}

.slider img:nth-child(2) { animation-delay: 7s; }
.slider img:nth-child(3) { animation-delay: 14s; }
.slider img:nth-child(4) { animation-delay: 21s; }
.slider img:nth-child(5) { animation-delay: 28s; }
.slider img:nth-child(6) { animation-delay: 35s; }
.slider img:nth-child(7) { animation-delay: 42s; }

@keyframes slide {
    0% { opacity: 0; }
    1% { opacity: 1; }
    14.3% { opacity: 1; }
    15.3% { opacity: 0; }
    100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .slider img {
        animation: none;
    }
}

.boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 7px;
    margin: 0 var(--gutter-right) 0 var(--gutter-left);
    padding: 6px;
    background: #fff;
}

.boxes a,
.boxes img {
    display: block;
}

.shadow {
    margin: 0 var(--gutter-right) 0 var(--gutter-left);
}

.shadow img {
    display: block;
    width: 100%;
}

.home-content {
    margin: 0 var(--gutter-right) 0 var(--gutter-left);
    padding: 0 14px 20px;
    color: var(--muted);
}

.home-content h3 {
    color: var(--muted);
}

/* ---- Inner pages: banner, text, product column ---------------------------- */

.main {
    display: flex;
    align-items: flex-start;
    margin: 0 var(--gutter-right) 0 var(--gutter-left);
    padding: 0 7px 20px 0;
    background: #fff;
}

.content {
    flex: 1 1 auto;
    min-width: 0;
}

.page-banner {
    margin: 11px 7px 0 9px;
    padding: 6px 12px;
    background: var(--orange);
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.4;
}

.text {
    padding: 0 50px 0 19px;
}

.text li {
    margin: 0 0 8px;
}

.sidebar {
    flex: 0 0 268px;
    padding-top: 10px;
}

.sidebar a,
.sidebar img {
    display: block;
}

/* ---- Content -------------------------------------------------------------- */

h3 {
    color: var(--muted);
    font-size: 1.3em;
    line-height: 1.4;
}

.text a,
.home-content a {
    text-decoration: underline;
}

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

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

.aligncenter {
    display: block;
    margin: 0 auto 10px;
}

.alignnone.gap {
    margin-right: 10px;
}

.underline {
    text-decoration: underline;
}

hr {
    clear: both;
    border: 0;
    border-top: 1px solid #ccc;
}

.call-to-action {
    clear: both;
    max-width: 663px;
    min-height: 71px;
    margin: 10px 0 0;
    padding: 13px 10px 10px 83px;
    background: #000 url("/assets/img/c-2-a.jpg") no-repeat left top;
    color: #fff;
    font-size: 18px;
    line-height: 1.3;
}

.text .call-to-action a {
    color: #fff;
    text-decoration: none;
}

.text .call-to-action a:hover,
.text .call-to-action a:focus-visible {
    text-decoration: underline;
}

.back-to-top {
    margin-top: 1em;
}

.text .back-to-top a {
    text-decoration: none;
}

.map-link {
    float: right;
    margin: 0 0 10px 20px;
}

.sitemap li {
    margin: 2px 0;
}

/* Galleries (were NextGEN Gallery): thumbnails linking to the photo. */
.gallery {
    clear: both;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 1.5em;
    padding: 0;
    list-style: none;
}

.gallery a {
    display: block;
    padding: 4px;
    border: 1px solid #a9a9a9;
    background: #fff;
}

.gallery a:hover,
.gallery a:focus-visible {
    border-color: var(--orange);
}

.gallery img {
    display: block;
}

/* ---- Contact form ----------------------------------------------------------- */

.contact {
    clear: both;
    margin-top: 1.5em;
}

.field {
    margin: 0 0 12px;
}

.field label {
    display: block;
}

.field-note {
    margin: 0 0 4px;
}

.warning,
.text .warning a {
    color: red;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
    width: 100%;
    max-width: 420px;
    padding: 4px 6px;
    border: 1px solid #aaa;
    border-radius: 0;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.field textarea {
    max-width: 100%;
}

.field--file + .field--file {
    margin-top: -6px;
}

.field input[type="file"] {
    max-width: 100%;
    font: inherit;
}

.field [aria-invalid="true"] {
    border-color: var(--error);
}

.field-error {
    margin: 2px 0 0;
    color: var(--error);
}

.hp {
    position: absolute;
    left: -9999px;
}

.form-submit button {
    padding: 6px 24px;
    border: 0;
    background: var(--orange);
    color: #fff;
    font: bold 15px Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.form-submit button:hover,
.form-submit button:focus-visible {
    background: #e07f00;
}

.notice {
    margin: 0 0 1em;
    padding: 10px 14px;
    border: 2px solid;
}

.notice p {
    margin: 0;
}

.notice ul {
    margin: 6px 0 0;
}

.notice--success {
    border-color: #398f14;
}

.notice--error {
    border-color: var(--error);
}

/* ---- Footer ------------------------------------------------------------------- */

.site-footer {
    margin: 0 var(--gutter-right) 0 var(--gutter-left);
    padding: 12px 16px 20px;
    background: linear-gradient(var(--orange), #fe9100 60%, var(--orange-light));
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
}

.footer-columns {
    display: grid;
    grid-template-columns: 21% 20% 25% 1fr;
    gap: 0 12px;
    align-items: start;
}

.site-footer h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.site-footer ul {
    margin: 0;
    padding: 0 0 0 38px;
    list-style: disc;
}

.site-footer li {
    margin: 0;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #fff;
}

.footer-logo {
    justify-self: end;
}

.footer-below {
    margin: 0 var(--gutter-right) 0 var(--gutter-left);
    padding: 5px 14px 20px;
    color: var(--footer-below);
    font-size: 11px;
    line-height: 1.3;
}

.footer-below a {
    color: var(--footer-below);
}

/* Six columns of keyword links; on narrower screens the columns wrap. */
.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em 14px;
    margin: 0.8em 0;
}

.keywords ul {
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
}

/* ---- Narrow screens ------------------------------------------------------------- */

@media (max-width: 820px) {
    .main {
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar {
        flex: none;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        padding: 10px 17px 0;
    }

    .sidebar img {
        width: 100%;
    }

    .text {
        padding: 0 17px;
    }

    .boxes {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .footer-logo {
        justify-self: start;
    }

}

@media (max-width: 560px) {
    body {
        font-size: 15px;
    }

    .site-nav {
        padding: 8px 12px;
    }

    /* No hover on touch screens: the drop-down stays hidden; Products and the product
       buttons below each page lead to the same pages. */
    .site-nav li ul {
        display: none;
    }

    .page {
        --gutter-left: 0px;
        --gutter-right: 0px;
    }

    .main {
        padding-right: 0;
    }

    .boxes {
        grid-template-columns: minmax(0, 324px);
        justify-content: center;
    }

    .page-banner {
        margin: 11px 12px 0;
        font-size: 19px;
    }

    .text,
    .sidebar {
        padding-left: 12px;
        padding-right: 12px;
    }

    .alignright,
    .alignleft,
    .map-link {
        float: none;
        display: block;
        margin: 0 0 10px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }

    .call-to-action {
        font-size: 16px;
    }
}
