/* ==========================================================================
   Taiga
   Ported from the Umbraco 8 site: same colours, type and layout, rewritten
   without normalize.css, the clearfix and the float-based grid.
   ========================================================================== */

:root {
    --colour-text: #444;
    --colour-heading: #333;
    --colour-accent: #09f;
    --colour-accent-active: #08f;
    --colour-green: #272;
    --colour-error: #c00;
    --colour-rule: #eee;
    --colour-field-border: #ddd;
    --font-body: "Lucida Console", "Andale Mono", monospace;

    /* Widths of the two columns on the wide layout. */
    --column-left: 40%;
    --measure: 650px;
}

/* Reset ------------------------------------------------------------------ */
html,
body {
    margin: 0;
    padding: 0;
}

dl, menu, ol, ul {
    margin: 1em 0;
}

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

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

/* Base ------------------------------------------------------------------- */

body {
    color: var(--colour-text);
    font: 0.9em/1.5em var(--font-body);
    background-image: url(../images/taiga-bg-9.png);
    background-repeat: repeat-y;
    background-size: 9px auto;
}

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

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

a.active {
    color: var(--colour-accent-active);
}

a.small {
    font-size: 80%;
}

h1,
h2,
h3 {
    color: var(--colour-heading);
    font-weight: bold;
}

h1 {
    font-size: 1.6em;
    line-height: 1.6em;
}

p + p,
p + ul,
p + ol,
p + h2,
p + h3 {
    margin-top: 1em;
}

td {
    padding: 0 10px 10px 0;
}

/* Layout ----------------------------------------------------------------- */

.wrapper {
    padding: 5px 20px 5px 30px;
}

.header-container > .wrapper {
    background-color: #f9f9f9;
    border-bottom: 1px solid var(--colour-rule);
}

.header-container nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sitename {
    display: block;
    flex: none;
}

.sitename img {
    width: auto;
    height: 60px;
}

.navmain ul {
    list-style: none;
}

.navmain ul ul {
    padding-left: 20px;
}

/* The main column is capped so long lines stay readable. */
.main {
    max-width: var(--measure);
}

/* Language chooser ------------------------------------------------------- */

.language {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 130px;
}

.language ul {
    list-style: none;
}

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

.tagline {
    color: var(--colour-accent);
    font-weight: normal;
    font-size: 1.2em;
    line-height: 1.5em;
}

/*
   Word-size classes used from the rich text editor to set the homepage
   copy at mixed sizes. Kept as-is so existing content keeps working.
*/
.w1 { font-size: 75%;  color: var(--colour-heading); }
.w2 { font-size: 85%;  color: var(--colour-accent); }
.w3 { font-size: 100%; color: var(--colour-green); }
.w4 { font-size: 110%; color: var(--colour-heading); }
.w5 { font-size: 120%; color: var(--colour-accent); }
.w6 { font-size: 140%; color: var(--colour-green); }
.w7 { font-size: 170%; color: var(--colour-heading); }
.w8 { font-size: 190%; color: var(--colour-accent); }

/* Project list ----------------------------------------------------------- */

.projectlist dd {
    margin: 0 0 30px;
}

.projectlist dd img {
    margin: 0 15px 10px 0;
}

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

.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contactinfo,
.contactform {
    flex: 1 1 250px;
    max-width: 250px;
}

/* Forms ------------------------------------------------------------------ */

input,
textarea,
select {
    border: 1px solid var(--colour-field-border);
    padding: 3px;
    font: 0.8em var(--font-body);
}

textarea {
    height: 200px;
}

.textbox {
    width: 240px;
    max-width: 100%;
}

fieldset {
    margin: 5px 0;
    border-style: none;
}

fieldset ol {
    list-style: none;
}

fieldset li {
    padding: 3px 0;
}

label {
    display: block;
}

/* Honeypot: kept off-screen rather than display:none, which bots skip. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.input-validation-error {
    border: 1px solid var(--colour-error);
}

.field-validation-error {
    color: var(--colour-error);
    font-style: italic;
    display: block;
}

.field-validation-valid {
    display: none;
}

.messagebox.success {
    color: var(--colour-green);
}

.messagebox.error {
    color: var(--colour-error);
}

/* Higher density displays get the 2x background and logo. */
@media (min-resolution: 192dpi) {
    body {
        background-image: url(../images/taiga-bg-18.png);
    }
}

/* ==========================================================================
   Wide: the photo background with a fixed left column beside the content.
   ========================================================================== */

@media only screen and (min-width: 770px) {
    html {
        background-image: url(../images/taiga-bg-1000.png);
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: top left;
        background-size: cover;
        height: 100%;
        overflow: hidden;
    }

    body {
        background: none;
        overflow: auto;
        height: 100%;
        font-size: 0.9em;
        line-height: 1.5em;
    }

    .wrapper {
        padding: 20px 40px;
    }

    .header-container {
        position: fixed;
        width: 39.3%;
    }

    .header-container > .wrapper {
        background: none;
        border-bottom: none;
        padding-right: 0;
        padding-top: 10px;
    }

    .header-container nav {
        justify-content: space-between;
    }
    
    .sitename img {
        width: 150px;
        height: 150px;
    }

    /* Nav sits in a translucent panel to the right of the logo. */
    .navmain {
        background-color: #fff;
        opacity: 0.9;
        margin-left: 150px;
        flex: 1;
    }

    .navmain > ul {
        padding: 16px 20px 10px 0;
    }

    .navmain li {
        margin-right: 10px;
        text-align: right;
        min-height: 28px;
    }

    .navmain a {
        font-size: 110%;
    }

    .language {
        position: fixed;
        width: 100px;
        top: auto;
        right: auto;
        bottom: 0;
    }

    .main-container,
    .footer-container {
        width: 60%;
        margin-left: var(--column-left);
    }
}

@media only screen and (min-width: 1140px) {
    body {
        font-size: 1.1em;
        line-height: 1.6em;
    }

    .navmain a {
        font-size: 130%;
    }

    .navmain li {
        min-height: 36px;
    }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html,
    body {
        height: auto;
        overflow: visible;
    }

    .header-container,
    .main-container,
    .footer-container {
        position: static;
        width: auto;
        margin-left: 0;
    }

    .language {
        display: none;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    a[href^="javascript:"]::after,
    a[href^="#"]::after {
        content: "";
    }

    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    @page {
        margin: 0.5cm;
    }
}
