@charset "UTF-8";

:root {
    /* Colours */
    
    --topBar: #222;
    --navBar: #900300;
    --primaryColour-text: #900300;
    --primaryColour-text-hover: #640301;
    --primaryColour-bright: #ff671b;
    --primaryColour-light: #eee;
    
    --mainColour: #a8520c;
    --mainColour-hover: #f28a00;
    
    
    
    
    --textColour: #111;
    --textLinks: #00618d;
    --mainColourHighlight: #f8ca00;
    --mainColourHighlightHover: #ffa800;

    /* Fonts */
    --body: Georgia, Times, Times New Roman, serif;
    --secondary: 'EB Garamond', serif;
    --sans: 'Open Sans', sans-serif;
    --baseFontSize: 1rem;
    
    --contentbreak: 550px;
    --sidePadding: .75rem;
    @media screen and (min-width: 500px) {
        --sidePadding: 1.25rem;
    }

    @media screen and (min-width: 350px) {
        --baseFontSize: 1.1rem;
    }
    @media screen and (min-width: 500px) {
        --baseFontSize: 1.15rem;
    }
    @media screen and (min-width: 650px) {
        --baseFontSize: 1.2rem;
    }
    @media screen and (min-width: 800px) {
        --baseFontSize: 1.25rem;
    }
    @media screen and (min-width: 950px) {
        --baseFontSize: 1.3rem;
    }
    @media screen and (min-width: 1100px) {
        --baseFontSize: 1.35rem;
    }


    --maxTextWidth: calc(30vw + 400px);
    --maxWidth: 75rem;
    @indents: 1em;

    @left-margin: 15%;
}

body.coral {
     --topBar: #c2490f;
    --navBar: #7d3816;
    --primaryColour-text: #9e451b;
    --primaryColour-bright: #f0a160; 
    --primaryColour-light: #f8dac3;
    --primaryColour-light-hover: #efbf9a;
    blockquote::before, blockquote::after {
        content: url(../img/svgs/quotes-coral.svg);
    }
}

body.ferns {
     --topBar: #004b1c;
    --navBar: #116530;
    --primaryColour-text: #116530;
    --primaryColour-bright: #18a558; 
    --primaryColour-light: #d6fdde;
    --primaryColour-light-hover: #a4f3b3;
    blockquote::before, blockquote::after {
        content: url(../img/svgs/quotes-ferns.svg);
    }
}

body.fiery {
     --topBar: #cc5216;
    --navBar: #900300;
    --primaryColour-text: #900300;
    --primaryColour-text-hover: #640301;
    --primaryColour-bright: #ff671b; 
    --primaryColour-light: #ffe4e2;
    --primaryColour-light-hover: #fdc5c0;
    blockquote::before, blockquote::after {
        content: url(../img/svgs/quotes-fiery.svg);
    }
}

body.leaves {
     --topBar: #59981a;
    --navBar: #3d550c;
    --primaryColour-text: #59981a;
    --primaryColour-text-hover: #407b04;
    --primaryColour-bright: #81b622; 
    --primaryColour-light: #e6ee99;
    --primaryColour-light-hover: #d2df58;
    blockquote::before, blockquote::after {
        content: url(../img/svgs/quotes-leaves.svg);
    }
}

body.sea {
     --topBar: #0fb8d1;
    --navBar: #008085;
    --primaryColour-text: #008085;
    --primaryColour-text-hover: #00666a;
    --primaryColour-bright: #30bed3; 
    --primaryColour-light: #c8ecfa;
    --primaryColour-light-hover: #a1dbf1;
    blockquote::before, blockquote::after {
        content: url(../img/svgs/quotes-sea.svg);
    }
}

* {
    box-sizing: border-box;
}
html {
    background: #fff;
    padding: 0;
    margin: 0;
    font-family: var(--sans);
}
body {
    width: 100%;
    margin: 0 auto;
    padding: 40px 0 0;
    position: relative;
    font-size: 15.5px;
    text-align: center;
    &::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0,0,0,0);
        pointer-events: none;
        transition: .3s;
        z-index: 5;
    }
    &.shadow {
        &::after {
            background-color: rgba(0,0,0,0.5);
        }
    }
}
sup {
    vertical-align: unset;
    position: relative;
    top: -.45em;
    font-size: 80%;
}


/* Typography */
p, li {
    font-family: var(--body);
    font-size: var(--baseFontSize);
    font-optical-sizing: auto;
    line-height: 1.6;
    color: var(--textColour);
    text-align: left;
}
p, ul, ol {
    font-size: var(--baseFontSize);
    margin: 1rem auto 0;
    max-width: var(--maxTextWidth);
}
li {
    margin: 0 0 .65em;
}
#content > p:first-of-type {
    color: var(--primaryColour-text);
    line-height: 1.75;
    font-size: calc(var(--baseFontSize) * 1.15);
}
p.section {
    margin-top: 3.5rem;
    &::first-letter {
        font-size: 7.35rem;
        line-height: 1;
        float: left;
        margin: -.45rem .2rem -1rem 0;
        color: var(--primaryColour-text);
    }
}



/* Title area */
#content {
    background: #fff;
    position: relative;
    padding: 0 var(--sidePadding);
    display: inline-block;
    @media screen and (min-width: 500px) {
        padding: 0 1.25rem;
    }
    @media screen and (min-width: 1050px) {
        padding: 1.5rem 2.5vw;
        margin: -3.5rem auto 2rem;
        border-radius: 1.5rem;
        box-shadow: 0 -1.75rem .75rem -1rem rgba(0,0,0,0.45);
        max-width: 94vw;
        width: var(--maxWidth);
    }
    h1, h2 {
        font-family: var(--body);
        color: var(--textColour);
        font-weight: normal;
        max-width: var(--maxWidth);
        text-align: center;
    }
    h1 {
        font-size: 3rem;
        line-height: 115%;
        margin: 0 auto;
        
        @media screen and (min-width: 500px) {
            font-size: 4rem;
        }
        @media screen and (min-width: 650px) {
            font-size: 4.5rem;
        }
        @media screen and (min-width: 800px) {
            font-size: 5rem;
        }
        @media screen and (min-width: 950px) {
            font-size: 5.5rem;
        }
        @media screen and (min-width: 1100px) {
            font-size: 6rem;
        }
    }
    h2 {
        font-size: 1.75em;
        line-height: 120%;
        color: var(--primaryColour-text);
        margin: .5rem auto 1.5rem;
        @media screen and (min-width: 500px) {
            font-size: 2rem;
        }
        @media screen and (min-width: 650px) {
            font-size: 2.25rem;
        }
        @media screen and (min-width: 800px) {
            font-size: 2.5rem;
        }
        @media screen and (min-width: 950px) {
            font-size: 2.75rem;
        }
        @media screen and (min-width: 1100px) {
            font-size: 3rem;
        }
        + figure {
            @media screen and (min-width: 550px) {
                float: none;
                margin: 0;
                width: 100%;
                max-width: unset;
                img {
                    max-width: var(--maxWidth);
                    @media screen and (min-width: 550px) {
                        border-radius: 2rem;
                    }
                }
                figcaption {
                    text-align: center;
                }
            }
        }
    }
    figure {
        display: flex;
        flex-direction: column;
        gap: .75rem;
        @media screen and (max-width: 549.9px) {
            margin: 1rem calc(-1 * var(--sidePadding)) 1.5rem;
            figcaption {
                padding: 0 var(--sidePadding);
                display: flex;
                flex-direction: column;
                gap: .35rem;
            }
        }
        @media screen and (min-width: 550px) {
            max-width: var(--maxTextWidth);
            margin: 1rem auto 1.5rem;
            figcaption {
                text-align: left;
                em {
                    display: inline;
                    &::before {
                        content: "";
                        display: inline-block;
                        position: absolute;
                        width: 1px;
                        height: .75em;
                        left: 0;
                        top: .25em;
                        background-color: #aaa;
                    }
                }
            }
        }
        @media screen and (min-width: 750px) {
            width: calc(50% - 2rem);
            float: right;
            margin: 1.5rem 0 1.5rem 2rem;
            &:has(+ .section) {
                margin-top: 3.5rem;
            }
        }
        img {
            width: 100%;
            border-radius: 0;
        }
        max-width: var(--maxTextWidth);
        overflow: hidden;
        .overlay {
            position: relative;
            &::after {
                content: '';
                background-image: url(../img/ref/aged-overlay.jpg);
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-size: cover;
                background-position: center;
                mix-blend-mode: screen;
            }
        }
        figcaption {
            em {
                font-style: normal;
                margin-left: .65em;
                padding-left: .65em;
                position: relative;
                display: inline;
            }
        }
    }
    figure + h1 {
        margin-top: 30px;
    }
    
}

#content.bio {
    h3:first-of-type {
        text-align: center;
        width: 90%;
        margin: 0 auto 1.25rem;
        + figure {
            @media screen and (min-width: 550px) {
                float: none;
                margin: 0;
                width: 100%;
                max-width: unset;
                img {
                    max-width: var(--maxWidth);
                    @media screen and (min-width: 550px) {
                        border-radius: 2rem;
                    }
                    @media screen and (min-width: 800px) {
                        width: 90%;
                        margin: 0 auto;
                    }
                }
                figcaption {
                    text-align: center;
                }
            }
        }
    } 
}


blockquote {
    margin: 2rem auto 0;
    font-size: calc(var(--baseFontSize) * 1.15);
    font-family: var(--secondary);
    font-weight: 475;
    text-align: center;
    line-height: 1.6;
    color: var(--textColour);
    max-width: var(--maxTextWidth);
    position: relative;
    &::before {
        content: url(../img/svgs/quotes.svg);
        display: inline-block;
        width: 3rem;
        margin-right: .5rem;
    }
    &::after {
        content: url(../img/svgs/quotes.svg);
        display: inline-block;
        width: 1.5rem;
        margin-left: .5rem;
        transform-origin: center;
        transform: rotate(180deg);
        position: relative;
        top: .25rem;
        line-height: .8;
    }
    @media screen and (max-width: 449px) {
        margin-top: 3.5rem;
        &::before {
            position: absolute;
            top: -2.5rem;
            left: calc(50% - 1.5rem);
        }
    }
    + h6 {
        font-weight: 400;
        font-family: var(--sans);
        color: var(--primaryColour-text);
        font-size: calc(var(--baseFontSize) * .75);
        max-width: var(--maxTextWidth);
        margin: .65rem auto 3.5rem;
        text-align: center;
        position: relative;
        text-transform: uppercase;
        font-weight: 750;
        letter-spacing: 1px;
        em {
            font-weight: 650;
        }
        &::after {
            content: url(../img/svgs/curlicue.svg);
            display: inline-block;
            width: 2rem;
            position: absolute;
            bottom: -2rem;
            left: calc(50% - 1rem);
        }
        cite {
            font-style: normal;
        }
    }
}
h6 + p.section {
    margin-top: 5rem;
}
h6 + blockquote {
    @media screen and (max-width: 449px) {
        margin-top: 6.5rem;
    }
}



/* Dialogs */
span.trigger {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: .25rem;
    text-decoration-color: var(--primaryColour-bright);
    position: relative;
    &:hover {
        text-decoration-style: solid;
        cursor: pointer;
        text-decoration-thickness: .2rem;
        text-decoration-color: var(--primaryColour-text);
        &::after {
            background: var(--primaryColour-text);
        }
    }
    &::after {
        content: '+';
        color: #fff;
        padding-bottom: .1rem;
        top: -.2rem;
        position: relative;
        margin-left: .15rem;
        display: inline-flex;
        width: calc(var(--baseFontSize) * .85);
        height: calc(var(--baseFontSize) * .85);
        background: var(--primaryColour-bright);
        border-radius: 50%;
        font-family: var(--sans);
        font-weight: 600;
        font-size: calc(var(--baseFontSize) * .75);
        justify-content: center;
        align-items: center;
    }
}

dialog {
    display: block;
    font-size: var(--baseFontSize);
    width: 94dvw;
    height: auto;
    max-width: 800px;
    max-height: 85dvh;
    box-shadow: 0 .35rem .5rem -.25rem rgba(0,0,0,0.5);
    transform: scale(0);
    transform-origin: 50% 0;
    transition: .3s;
    position: fixed;
    top: 0;
    margin-top: 0;
    border: 0;
    padding: 2.25rem 1.5rem 1.5rem;
    overflow: auto;
    figure {
        float: right;
        margin: 0  0 15px 30px;
        width: 50%;
        img {
            width: 100%;
        }
        figcaption {
            text-align: left;
            font-size: 15.5px;
        }
    }
    p:last-child {
        margin-bottom: 0;
    }
    &.open {
        display: block;
        transform: scale(1);
        margin-top: 10dvh;
        z-index: 10;
        box-shadow: 0 .5rem .5rem -.25rem rgba(0,0,0,0.5);
    }
    button {
        position: absolute;
        top: 0;
        right: 0;
        background-color: var(--primaryColour-bright);
        background-image: url(../img/svgs/close.svg);
        background-position: center;
        background-repeat: no-repeat;
        background-size: 55%;
        width: 2.5rem;
        height: 2rem;
        border: none;
        font-size: 0;
        transition: .25s;
        &:hover {
            background-size: 65%;
            background-color: var(--primaryColour-text);
        }
    }
}

/* Sidebar */
#sidebar {
    display: none !important;
}




/* Navigation */
#toolbar {
    width: 100%;
    background: #222;
    position: fixed;
    z-index: 15;
    top: 0;
    height: 40px;
    padding: 0 1em;
    .measure {
        max-width: var(--maxWidth);
        margin: 0 auto;
        position: relative;
        height: 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        > a, #mobile-nav {
            width: 4.5rem;
        }
        img {
            position: absolute;
            top: 3px;
            width: 32px;
            left: 0;
        }
        h1 {
            color: #fff;
            background: transparent;
            font-weight: 400;
            font-size: 18px;
            font-family: var(--body);
            a {
                text-decoration: none;
                color: #fff;
                &:hover {
                    color: var(--primaryColour-bright);
                }
            }
        }
    }
}
#map-show {
    position: fixed;
    top: 10px;
    right: 100px;
    z-index: 20;
    display: none;
    &::before {
        content: 'Map';
        color: #fff;
    }
    &:hover {
        cursor: pointer;
        &::before {
            color: var(--mainColour);
        }
    }
}
#map {
    position: fixed;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    transform: scale(0) translate(-50%,-50%);
    transition: .35s ease-in;
    width: 96vw;
    max-width: 96vh;
    display: inline-block;
    background: #fff;
    z-index: 35;
    border: .75em solid #fff;
    z-index: 50;
    box-shadow: 0 0 0 30vw rgba(0,0,0,0.65);
    img {
        width: 100%;
    }
    p {
        position: absolute;
        top: 50%;
        left: 50%;
        margin: 0;
        width: 0;
        height: 0;
        span {
            position: absolute;
            right: 22px;
            bottom: 12px;
            background: #fff;
            padding: 2px 8px 4px;
            line-height: 100%;
            border-radius: 12px;
            font-size: 16px;
            white-space: nowrap;
        }
        &::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: -4px;
            width: 0;
            height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 8px solid #fff;
        }
        &::before {
            position: absolute;
            bottom: 7px;
            left: -17px;
            content: "";
            display: inline-block;
            width: 34px;
            height: 34px;
            background-color: #fff;
            background-size: 84%;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 2px;
            box-shadow: 0 4px 5px rgb(0 0 0 / 50%);
        }
    }
    p.semi::before, p.semi::after {
        opacity: .65;
    }
    p.flip span {
        right: unset;
        left: 22px;
    }
    p.primary {
        span {
            background: var(--mainColour);
        }
        &::before {
            background-color: var(--mainColour);
        }
        &::after {
            border-top: 8px solid var(--mainColour);
        }
    }
    p.city::before {
        background-image: url('../img/usa/ref/city.svg');
    }
    #map-close {
        position: absolute;
        top: -1.25em;
        right: -1.25em;
        width: 50px;
        height: 50px;
        content: "";
        display: inline-block;
        background-color: var(--mainColour);
        background-image: url(../img/ref/cross.svg);
        background-position: center;
        background-repeat: no-repeat;
        background-size: 70%;
        &:hover {
            cursor: pointer;
            background-color: var(--mainColour-hover);
        }
    }
}
#map.active {
    transform: scale(1) translate(-50%,-50%);
}
nav {
    position: relative;
    z-index: 3;
    text-align: center;
    background: radial-gradient(circle, var(--topBar) 10%, var(--navBar) 80%);
    padding: .35rem 1rem .75rem;
    .measure {
        margin: 0 auto;
        max-width: var(--maxWidth);
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        justify-content: space-between;
        height: 100%;
        p {
            text-align: center;
            max-width: unset;
        }
        a span:first-of-type {
            display: none;
        }
        a span:nth-of-type(2) {
            display: unset;
        }
    }
    @media screen and (min-width: 650px) {
        margin: 0 auto;
        .measure {
            p {
                order: 2;
            }
            a span:first-of-type {
                display: unset;
            }
            a span:nth-of-type(2) {
                display: none;
            }
            a:last-of-type {
                order: 3;
                text-align: right;
            }
            &:nth-of-type(2) {
                margin-top: 2rem;
                a {
                    margin: 0 1rem;
                }
            }
        }
    }
    &:first-of-type {
        @media screen and (min-width: 800px) {
            height: 3.5rem; 
            a {
                max-width: calc(50% - 10rem);
            }
            a:first-of-type {
                order: 1;
            }
            p {
                position: absolute;
                width: 20rem;
                left: calc(50% - 10rem);
                flex-basis: 40%;
            }
        }
    }
    p {
        flex-basis: 100%;
        color: var(--primaryColour-light);
        display:flex;
        flex-direction: column;
        font-family: var(--sans);
        font-weight: 600;
        text-transform: uppercase;
        line-height: 1.1;
        padding: 0 .75rem;
        margin: 0;
        justify-content: center;
        order: 1;
        @media screen and (min-width: 400px) {
            letter-spacing: .1rem;
        }
        em {
            font-family: var(--body);
            font-style: normal;
            font-weight: 400;
            color: #fff;
        }
        strong {
            font-size: .9rem;
            font-weight: 400;
        }
    }
    .measure > a {
        text-decoration: none;
        font-family: var(--sans);
        color: var(--primaryColour-light);
        align-items: center;
        position: relative;
        order: 2;
        &::after {
            content: '•';
            position: absolute;
            font-size: 1rem;
            bottom: 0;
        }
        &:hover {
            cursor: pointer;
            color: var(--primaryColour-light-hover);
        }
        &:first-of-type {
            text-align: left;
            padding: 0 .25rem .2rem .6rem;
            margin-left: .75rem;
            border-bottom: 1px solid;
            &::before {
                content: '\27A3';
                display: inline-block;
                position: absolute;
                left: -.75rem;
                bottom: -.85rem;
                font-size: 1.25rem;
                transform: scaleX(-1);
            }
            &::after {
                right: -.1rem;
                bottom: -.65rem;
            }
            
        }
        &:last-of-type {
            order: 3;
            text-align: right;
            margin-right: .75rem;
            padding: 0 .6rem .2rem .25rem;
            border-bottom: 1px solid;
            &::before {
                content: '\27A2';
                display: inline-block;
                position: absolute;
                right: -.75rem;
                bottom: -.85rem;
                font-size: 1.25rem;
                margin-left: .25rem;
            }
            &::after {
                left: -.1rem;
                bottom: -.65rem;
            }
        }
    }
}






/* Title */
#title {
    width: 100%;
    height: 100px;
    @media screen and (min-width: 500px) {
        height: 20vw;
    }
    @media screen and (min-width: 1050px) {
        height: 210px;
        margin-bottom: 0;
    }
    margin: 0 0 1rem;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    text-align: center;
    padding: 0 0 1rem;
    @media screen and (min-width: 500px) {
        padding-bottom: 1.5rem;
    }
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    h1, h2 {
        font-family: var(--body);
        color: #fff;
        text-shadow: 0 2px 5px rgba(0,0,0,0.75);
    }
    h1 {
        font-size: 1.4em;
        padding-bottom: .5em;
        display: inline-block;
        border-bottom: 1px solid #fff;
        margin: 0;
        font-weight: 700;
    }
    h2 {
        font-size: 1.1em;
        margin: .5em 0 0;
        font-weight: normal;
    }
}
#title.hero {
    padding: 0;
    height: calc(50dvh - 40px);
    min-height: 325px;
    position: relative;
    margin: 0;
    img.logo {
        width: 115px;
        position: absolute;
        left: 50%;
        top: 20%;
        transform: translate(-50%,-50%);
        transition: .35s;
    }
    h1 {
        font-family: var(--sans);
        position: absolute;
        display: block;
        border-bottom: none;
        color: #fff;
        width: 100%;
        text-align: center;
        top: 40%;
        font-size: 2em;
        text-shadow: 0 0.1em 0.15em rgba(0, 0, 0, 0.85);
        z-index: 5;
    }
    figure {
        display: none;
        width: 100%;
        height: 100%;
        margin: 0;
        text-align: center;
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        figcaption {
            position: absolute;
            bottom: 3.5rem;
            left: 50%;
            transform: translateX(-50%);
            width: 100vw;
            max-width: 1400px;
            display: flex;
            justify-content: center;
            p {
                position: relative;
                z-index: 5;
                display: inline-block;
                background: rgba(0,0,0,0.75);
                color: #fff;
                padding: 5px 15px;
                font-family: var(--sans);
                font-size: .8em;
                margin: 0;
                border-radius: 1rem 1rem 0 0;
                em {
                    margin-left: 12px;
                    display: inline-block;
                }
            }
        }
    }

    div.links {
        position: absolute;
        bottom: 6.5em;
        left: 5vw;
        width: 90vw;
        display: flex;
        justify-content: space-around;
        a {
            display: inline-block;
            padding: .65em 1em;
            border-radius: 2em;
            background: #fff;
            color: #222;
            text-decoration: none;
            box-shadow: 0 3px 5px rgba(0,0,0,0.5);
            position: relative;
            @media screen and (min-width: 500px) {
                padding: 0.75em 1em 0.75em 3em;
                &::before {
                    content: "";
                    position: absolute;
                    width: 2.2em;
                    height: 2.2em;
                    border-radius: 50%;
                    background: #eee;
                    display: inline-block;
                    left: 0.3em;
                    top: 0.3em;
                    background-position: center;
                    background-size: cover;
                }
                &.uk {
                    &::before {
                        background-image: url(../img/ref/flag-england.jpg);
                    }
                }
                &.usa {
                    &::before {
                        background-image: url(../img/ref/flag-usa.jpg);
                    }
                }
            }
        }
    }
}
#title.hero.one {
    figure:nth-of-type(1) {
        display: block;
    }
}
#title.hero.two {
    figure:nth-of-type(2) {
        display: block;
    }
}
#title.hero.three {
    figure:nth-of-type(3) {
        display: block;
    }
}
#title.hero.four {
    figure:nth-of-type(4) {
        display: block;
    }
}
#title.hero.five {
    figure:nth-of-type(5) {
        display: block;
    }
}
/* General titles */
#title.history {
    background-image: url('../img/usa/big-picture/banner-big-picture.jpg');
    background-position: 50% 62%;
}
/* USA titles */
#title.city {
    background-image: url('../img/usa/footer-usa.jpg');
    background-position: 50% 50%;
}
#title.prologue {
    background-image: url('../img/usa/intro/prologue.jpg');
    background-position: 50% 75%;
}
#title.paradise {
    background-image: url('../img/usa/paradise/paradise-banner.jpg');
    background-position: 50% 55%;
}
#title.jerusalem {
    background-image: url('../img/usa/jerusalem/jerusalem-banner.jpg');
    background-position: 50% 58%;
}
/* England titles */
#title.engtitle {
    background-image: url('../img/england/engtitle/fighting_temeraire.jpg');
    background-position: 50% 50%;
}
#title.engprologue {
    background-image: url('../img/england/prologue/tapestry.jpg');
    background-position: 50% 50%;
}
#title.engnormans {
    background-image: url('../img/england/normans/normans-banner2.jpg');
    background-position: 50% 50%;
}
#title.engangevins {
    background-image: url('../img/england/angevins/angevins-header.jpg');
    background-position: 50% 58%;
}




.modal figure figcaption {
    text-align: left;
}

/* Sidebar nav */
#mobile-nav {
    color: #fff;
    &:hover {
        color: var(--primaryColour-light);
        cursor: pointer;
    }
}
#contents {
    position: fixed;
    right: -22rem;
    top: 0;
    width: 20rem;
    max-width: 90dvw;
    height: 100dvh;
    background-color: #fff;
    padding: 1.5rem .75rem .75rem;
    text-align: left;
    font-size: var(--baseFontSize);
    transition: .3s;
    box-shadow: -.35rem 0 .5rem rgba(0, 0, 0, .65);
    &.active {
        right: 0;
    }
    button {
        outline: none;
        color: #fff;
        background-color: var(--primaryColour-text);
        font-size: inherit;
        padding: .15rem .85rem;
        border: none;
        border-radius: 1.5rem;
        margin: 0 0 .5rem 1.15rem;
    }
    h3 {
        font-family: var(--body);
        position: relative;
        padding: 0.5rem 0 0.15rem 1.25rem;
        font-size: inherit;
        margin: .35rem 0 0;
        color: #555;
        &::before {
            content: url('../img/svgs/arrow.svg');
            display: inline-block;
            position: absolute;
            left: 0;
            top: .9rem;
            width: .85rem;
            transform-origin: center;
            transform: rotate(0deg);
            transition: .3s;
        }
        &.active {
            color: var(--textColour);
            &::before {
                transform: rotate(90deg);
            }
        }
        &:hover {
            cursor: pointer;
            color: var(--textColour);
        }
    }
    a {
        margin-left: 1.25rem;
        font-size: 80%;
        font-family: var(--sans);
        display: block;
        text-decoration: none;
        color: #666;
        line-height: 1.25;
        margin-top: .65rem;
        &:hover {
            cursor: pointer;
            color: var(--primaryColour-text);
        }
        &.active {
            color: #111;
            font-weight: 600;
            pointer-events: none;
        }
    }
    section {
        display: none;
        padding-bottom: .5rem;
    }
}
figure + #sidebar {
    margin-top: 35px;
}


/* Main text */
q {
    font-style: italic;
    em {
        font-style: normal;
    }
}


#main.rev {
    blockquote {
        line-height: 1.75;
        padding: 0 .35em;
        text-indent: 0;
        &::before, &::after {
            content: none;
        }
        span {
            color: #fff;
            background-color: #222;
            padding: .15em 0;
            box-shadow: -.35em 0 0 #222, .35em 0 0 #222;
        }
        + h6 {
            color: #fff;
        }
    }
}
#main.contents {
    margin-top: 0;
}

/* Bibiiographies */
p.biblio {
    font-family: var(--sans);
    font-size: .9rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .1px;
    margin: 2rem auto 0;
    text-indent: 0;
    color: #555;
    position: relative;
    padding-left: 1rem;
    transition: .3s;
    align-self: flex-start;
    &::before {
        content: url('../img/ref/arrow.svg');
        position: absolute; 
        left: 0;
        top: .4em;
        transform-origin: 50% 50%;
        width: .85em;
        opacity: .6;
    }
}

p.biblio:hover::before, p.biblio.open::before{
    opacity: .85;
}
p.biblio.open::before {
    transform: rotate(90deg);
}
p.biblio:hover {
    cursor: pointer;
}
p.biblio:hover, p.biblio.open {
    color: #222;    
}
p.biblio + ul {
    display: none;
    list-style-type: none;
    padding: 0 0 0 1em;
    margin: 5px auto 15px;
}
p.biblio + ul li {
    font-family: var(--sans);
    font-size: 1rem;
    color: #111;
    margin-bottom: 7px;
}
p.biblio + ul li::after {
    left: 0;
}
span.block {
    display: inline-block;
}



h3 {
    text-align: left;
    font-weight: normal;
    font-size: 1rem;
    line-height: 140%;
    border-top: 1px solid #ccc;
    padding-top: 12px;
    font-family: var(--body);
}




/* Extra info */
.ref {
    display: inline-block;
    border-bottom: 1px dashed #aC8a00;
}
.ref:hover {
    cursor: pointer;
    color: #000;
    border-bottom: 1px solid #f8ca00;
}


.panel {
    background-color: var(--primaryColour-light);
    border-top: .35rem solid var(--primaryColour-text);
    max-width: var(--maxTextWidth);
    margin: 1rem auto 0;
    padding: .5rem 1rem;
    border-radius: 0 0 .75rem .75rem;
    font-family: var(--sans);
    h3 {
        color: var(--primaryColour-text);
        font-family: inherit;
        margin: 0 0 .5rem;
        border: none;
        padding-top: 0;
    }
    h5 {
        color: var(--primaryColour-text);
        text-align: left;
        margin: .75rem 0 0;
    }
    p {
        font-size: .9rem;
        font-family: inherit;
        margin: .35rem 0 0;
        a {
            text-decoration: none;
            color: var(--primaryColour-text);
            &:hover {
                cursor: pointer;
                text-decoration: underline;
            }
        }
    }
}



a.prev:hover {
    background: url('../img/prev_wh.png') no-repeat  6px 3px #c75a24;
}
a.next:hover {
    background: url('../img/next_wh.png') no-repeat right 6px top 3px #c75a24;
}

#banner {
    width: 40%;
    margin: 50px auto 15px;
    display: block;
}
.secnum {
    margin: 20px auto 30px;
    width: 400px;
    display: block;
}


/* Title pages */
#content.chapter {
    margin-top: 0;
    text-align: center;
    figure.circle {
        float: none;
        margin: 0 auto;
        max-width: 800px;
        @media screen and (max-width: 549.9px) {
            margin: 1rem 0 1.5rem;
        }
        @media screen and (min-width: 550px) {
            margin: 1rem auto .5rem;
            width: 100%;
            img {
                border-radius: 2rem;
            }
            figcaption {
                text-align: center;
            }
        }
    }
    h1 {
        font-size: 3rem;
        @media screen and (min-width: 550px) {
            font-size: 4rem;
        }
        @media screen and (min-width: 750px) {
            font-size: 5.5rem;
        }
        margin: 15px 0 10px;
        position: relative;
        text-align: center;
        line-height: 110%;
        strong {
            display: block;
            line-height: 1;
            color: var(--primaryColour-bright);
        }
    }
    h2 {
        font-size: 2em;
        @media screen and (min-width: 550px) {
            font-size: 2.75rem;
        }
        @media screen and (min-width: 750px) {
            font-size: 3.5rem;
        }
        margin-top: 0;
        margin-bottom: 1.5rem;
        position: relative;
        text-align: center;
        em {
            font-style: normal;
            font-size: 0.75em;
            display: inline-block;
            @media screen and (max-width: 549.9px) {
                display: block;
            }
        }
    }
}

/* Contents pages */
#content.contents-page {
    margin-bottom: 1rem;
    a {
        display: block;
        border-top: 1px solid #ccc;
        transition: .5s;
        background: #fff;
        position: relative;
        margin: 0 -1rem;
        padding: 1rem;
        text-decoration: none;
        min-height: 9.25em;
        img {
            position: absolute;
            left: 1rem;
            margin-bottom: .6em;
            border-radius: 50%;
            width: 5.75rem;
            height: 5.75rem;
            filter: grayscale(60%);
            transition: .5s;
            outline: 0rem solid var(--primaryColour-light);
        }
        h1 {
            font-size: 1.75em;
            color: #222;
            padding-left: 7rem;
            min-height: 6.5rem;
            margin: 0;
            transition: .5s;
            display: flex;
            flex-direction: column;
            justify-content: center;
            text-align: left;
            em {
                display: block;
                color: #666;
                font-size: 70%;
                font-weight: normal;
                font-style: normal;
                transition: .5s;
            }
        }
        p {
            color: var(--textColour);
            font-family: var(--body);
            margin: 0;
            line-height: 160%;
            clear: both;
        }
        &:hover, &:focus {
            outline: none;
            background: var(--primaryColour-light);
            border-radius: .65rem;
            border-top-color: transparent;
            + a {
                border-top-color: transparent;
            }
            img {
                filter: grayscale(0);
                outline: .35rem solid #fff;
            }
            h1 {
                color: var(--primaryColour-text);
                em {
                    color: var(--primaryColour-bright);
                }
            }
           
        }
        &:first-of-type {
            margin-top: 15px;
            border-top: none;
        }
        @media screen and (min-width: 500px) {
            padding-left: 9rem;
            min-height: 7.5rem;
            img{
                width: 7rem;
                height: 7rem;
            }
            h1 {
                font-size: 1.75rem;
                padding-left: 0;
                min-height: unset;
            }
        }
        @media screen and (min-width: 800px) {
            padding-left: 10rem;
            min-height: 8.5rem;
            img{
                width: 8rem;
                height: 8rem;
            }
            h1 {
                font-size: 2.25rem;
            }
        }
        @media screen and (min-width: 1000px) {
            padding-left: 12rem;
            min-height: 11rem;
            img{
                width: 9rem;
                height: 9rem;
            }
            h1 {
                font-size: 2.5rem;
            }
        }
    }
}

/* Dropdowns */
h4 {
    background: var(--mainColour);
    margin: 1.5em 0 0;
    padding: .25em .5em .25em 1.25em;
    position: relative;
    width: 100%;
    &::before {
        content: url('../img/ref/arrow.svg');
        position: absolute;
        left: 0.4em;
        top: 0.5em;
        display: inline-block;
        width: .7em;
        transform-origin: center;
        transform: rotate(0deg);
        transition: .3s;
    }
    &:hover {
        cursor: pointer;
        background: darken(var(--mainColour),5%);
    }
}
h4.open::before {
    transform: rotate(90deg);
}
#main div.dropdown {
    display: none;
    padding: .25em .5em;
    background: #eaeaea;
    p:first-of-type {
        font-family: var(--sans);
        font-size: unset;
        line-height: 160%;
    }
    h5 {
        font-size: 1em;
        margin: .75em 0 .1em;
    }
}


/* Footer */
footer {
    width: 100%;
    height: 100px;
    transition: 0.35s;
    background-position: 50% 65%;
    background-repeat: no-repeat;
    background-size: cover;
}
footer.USA, .usa footer {
    background-image: url('../img/usa/footer-usa.jpg');
}
footer.england {
    background-image: url('../img/england/footer_england.jpg');
}
footer.history {
    background-image: url('../img/usa/big-picture/banner-big-picture.jpg');
    background-position: 50% 55%;
}


/* Landing page */
#home, #cover {
    header {
        background: #222;
        width: 100vw;
        position: fixed;
        top: 0;
        height: 40px;
        z-index: 10;
        box-shadow: 0 2px 15px 8px rgba(0,0,0,0.25);
    }
}
#home {
    #tabs {
        position: relative;
        width: 100%;
        max-width: 1000px;
        margin: 0 auto;
        padding: 0;
        display: flex;
        div {
            font-size: 1.15em;
            display: inline-block; 
            width: 30%;
            flex-grow: 1;
            text-align: center;
            margin: 0;
            padding: .75em 0;
            background: #eee;
            color: #333;
            &:first-child {
                border-radius: .35em 0 0 0;
            }
            &:last-child {
                border-radius: 0 .35em 0 0;
            }
            &:nth-child(n+2) {
                box-shadow: .3em 0 .1em -.2em rgba(0,0,0,0.05) inset;
            }
            &:hover {
                cursor: pointer;
                color: #000;
            }
        }
        div.active {
            background: var(--mainColour);
            color: #000;
            font-weight: bold;
        }
    }
    section {
        width: 100%;
        max-width: 1000px;
        margin: 0 auto;
        display: none;
        h3 {
            border-top: none;
            color: darken(var(--mainColour),10%);
        }
    }
    section.active {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
}

/* Cover pages */
#cover {
    height: 100vh;
    #hero {
        position: absolute;
        top: 40px;
        right: 0;
        bottom: 0;
        left: 50vw;
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }
    #text {
        width: 50%;
        img {
            width: 70%;
            margin: 10% 0 0 20%;
        }
        p {
            width: 70%;
            margin-left: 20%;
            padding-right: 1vw;
            font-family: var(--body);
            font-size: 2.25vw;
            text-align: right;
        }
        a {
            color: #fff;
            padding: 10px 20px;
            border-radius: 20px;
            text-decoration: none;
            margin-left: 20%;
        }
    }
}

