/*
 * Middeleeuwse Paleografie
 *
 * The look follows Mouse & Manuscript (mouse.digitalscholarship.nl): the
 * base, header, navigation, lists, content card, footer and form styles
 * are taken from its main.css. Paleo-specific components are at the end.
 */

/* Base
   ========================================================================== */

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

html {
    font-size: 62.5%;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
}

body {
    font-family: PTSerif, Georgia, serif;
    line-height: 1.6;
    color: #272727;
    background: #f5f5f5;
}

::selection {
    background-color: #001158;
    color: #fff;
}

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

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

@font-face {
    font-family: 'PTSerif';
    src: url("/fonts/PTSerif-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'PTSerif';
    src: url("/fonts/PTSerif-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'PTSerif';
    src: url("/fonts/PTSerif-Italic.woff") format("woff");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'PTSerif';
    src: url("/fonts/PTSerif-BoldItalic.woff") format("woff");
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Vestula';
    src: url("/fonts/VestulaPro-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Vestula';
    src: url("/fonts/VestulaPro-RegularItalic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Vestula';
    src: url("/fonts/VestulaPro-Semibold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Logo';
    src: url("/fonts/vestula-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
}

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

/* Layout
   ========================================================================== */

.wrapper__full {
    max-width: 118rem;
    margin: 0 auto;
    display: block;
}

.wrapper__full--top {
    margin-top: 9rem;
}

.wrapper__medium {
    max-width: 88rem;
    margin: 0 auto;
    display: block;
}

.wrapper__medium--top {
    margin-top: 6rem;
}

/* Header & navigation
   ========================================================================== */

.header__box {
    background-color: #fff;
    border-bottom: 1px dotted #ccc;
    position: relative;
}

.header__wrapper {
    position: relative;
}

.header__ullogo {
    width: 13rem;
    position: absolute;
    top: 2.6rem;
}

.header__logo {
    margin: 0;
    padding: 3.6rem 0 0;
    text-align: center;
    font-weight: 700;
}

.header__logolink {
    font: 3.2rem/1.1 Logo, Vestula, sans-serif;
    text-decoration: none;
    color: #333;
}

.header__logo span {
    color: #b27f2b;
}

.navigation {
    padding-bottom: .4rem;
    text-align: center;
}

.navigation__checkbox,
.navigation__toggle {
    display: none;
}

.navigation__list {
    font: 1.5rem/1 Vestula, sans-serif;
    list-style: none;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}

.navigation__item {
    display: inline-block;
    padding: 1.6rem 0;
}

.navigation__link {
    color: #9d9a9e;
    text-decoration: none;
    padding: 1.6rem 1.8rem;
}

.navigation__link:hover,
.navigation__link--active {
    color: #b27f2b;
}

.language-switch {
    position: absolute;
    top: 3.4rem;
    right: 0;
    list-style: none;
    font: 1.3rem/1 Vestula, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.language-switch__item {
    display: inline;
}

.language-switch__item + .language-switch__item::before {
    content: "|";
    color: #ccc;
    padding: 0 .4rem;
}

.language-switch__link {
    color: #9d9a9e;
    text-decoration: none;
}

.language-switch__link:hover {
    color: #b27f2b;
}

.language-switch__link[aria-current] {
    color: #333;
    font-weight: 700;
}

/* Page headings
   ========================================================================== */

.header__container {
    text-align: center;
}

.pageheader--big {
    margin-bottom: 6rem;
    color: #505961;
    font: 700 3.9em/1.25 Vestula, sans-serif;
}

.page-title {
    color: #000;
    font-size: 3.8rem;
    line-height: 1.36;
    font-style: italic;
    padding: 6.4rem 0 3.2rem;
    font-weight: normal;
    display: table;
    text-align: center;
    margin: auto;
}

.page-title span {
    color: #666;
    font: normal 1.2rem/1.6 Vestula, sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    border-top: 1px dotted #ccc;
    margin-top: 8px;
    padding-top: 12px;
}

/* Content
   ========================================================================== */

.intro,
.about-content {
    font-size: 1.8rem;
    width: 60%;
    margin: auto;
    color: #505961;
}

.intro p,
.about-content p,
.about-content ul,
.about-content ol {
    margin-bottom: 1.7rem;
}

.about-content ul,
.about-content ol,
.inner-content ul,
.inner-content ol {
    padding: 0 0 0 4rem;
}

.inner-content {
    background: #fff;
    width: 70%;
    margin: auto;
    padding: 4rem 6rem;
    font-size: 1.8rem;
    box-shadow: 1px 1px 20px 1px rgb(0 0 0 / 7%);
}

.inner-content h2 {
    margin: 0 0 2rem;
    color: #b27f2b;
    font-size: 22px;
    font-weight: normal;
}

.inner-content h3 {
    color: #001158;
    font: 700 2rem/1.2 Vestula, sans-serif;
    margin: 2.4rem 0 .5rem;
    clear: both;
}

.inner-content p,
.inner-content ul,
.inner-content ol {
    margin-bottom: 1.7rem;
}

.inner-content a,
.about-content a,
.intro a {
    color: #b27f2b;
    text-decoration: none;
}

.inner-content a:hover,
.about-content a:hover,
.intro a:hover {
    text-decoration: underline;
}

.inner-content section + section {
    border-top: 1px dotted #ccc;
    margin-top: 3rem;
    padding-top: 3rem;
}

/* Lists of dossiers (like the lesson lists of Mouse & Manuscript)
   ========================================================================== */

.courselist {
    list-style: none;
}

.courselist::after {
    content: "";
    clear: both;
    display: table;
}

.courselist li {
    float: left;
    width: 48%;
    margin-left: 4%;
    margin-bottom: 40px;
}

.courselist li:nth-child(2n+1) {
    margin-left: 0;
    clear: left;
}

.courselist--home li {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-bottom: 0;
    overflow: auto;
}

.courselist a {
    text-decoration: none;
}

.course-info {
    display: table;
}

.courselist h3 {
    margin-top: 8px;
    font-size: 19px;
    color: #505861;
    font-weight: normal;
    line-height: 1.3;
}

.courselist p {
    font-size: 1.5rem;
    color: #999;
    line-height: 1.35;
}

.courselist p span {
    color: #68727d;
    font-style: italic;
    display: block;
}

.courselist img {
    float: left;
    width: 140px;
    height: 100px;
    object-fit: cover;
    margin: 12px 16px 20px 0;
    box-shadow: 3px 3px 11px 1px rgb(0 0 0 / 30%);
    transition: transform .2s;
}

.courselist__placeholder {
    float: left;
    width: 140px;
    height: 100px;
    margin: 12px 16px 20px 0;
    background: rgb(178 127 43 / 10%);
    color: #b27f2b;
    font: italic 2.4rem/100px PTSerif, Georgia, serif;
    text-align: center;
    box-shadow: 3px 3px 11px 1px rgb(0 0 0 / 15%);
}

.courselist a:hover img {
    transform: scale(1.05);
}

.courselist a:hover h3 {
    color: #b27f2b;
}

/* Home
   ========================================================================== */

.hero {
    height: 440px;
    background: rgb(178 127 43 / 10%);
    position: relative;
}

.hero h1 {
    padding-top: 12rem;
    color: #44351c;
    width: 390px;
    font-weight: normal;
    font-size: 36px;
    line-height: 1.3;
    font-style: italic;
    float: left;
}

.hero h1 span {
    display: block;
    font-size: 20px;
    font-style: normal;
    opacity: .7;
    margin-top: 20px;
}

.hero figure {
    float: left;
}

.hero img {
    max-width: 640px;
    filter: drop-shadow(15px 15px 15px rgb(0 0 0 / 30%));
    transform: rotate(1deg);
    margin-left: 145px;
    margin-top: 30px;
}

.home-text {
    float: left;
    width: 46%;
    font-size: 1.8rem;
}

.home-text p {
    margin: 1rem 0;
}

.home-text p:first-of-type::first-letter {
    line-height: 1;
    font-size: 56px;
    float: left;
    margin-bottom: -6px;
    padding: 0 12px 0 0;
    color: #b27f2b;
}

.home-lessons {
    float: left;
    width: 42%;
    margin-left: 6%;
}

.home-lessons h2 {
    font-weight: normal;
    font-size: 26px;
    margin: 0 0 10px;
    color: #b27f2b;
}

.more {
    text-decoration: none;
    font: normal 1.6rem/1 Vestula, sans-serif;
    color: #b27f2b;
    float: right;
}

.more:hover {
    text-decoration: underline;
}

/* Dossier pages
   ========================================================================== */

.dossier-tabs {
    list-style: none;
    text-align: center;
    font: 1.4rem/1 Vestula, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4rem;
}

.dossier-tabs__item {
    display: inline-block;
    margin: 0 .6rem;
}

.dossier-tabs__link {
    display: block;
    padding: 1rem 1.6rem .8rem;
    color: #9d9a9e;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.dossier-tabs__link:hover {
    color: #b27f2b;
}

.dossier-tabs__link[aria-current] {
    color: #333;
    border-bottom-color: #b27f2b;
}

.regest {
    font-style: italic;
    color: #505961;
}

.viewer-box {
    margin: 0 auto 4rem;
    max-width: 118rem;
}

/* The OpenSeadragon viewer brings its own styles; make it as roomy as the
   document viewer on Mouse & Manuscript */
.viewer-box .viewer {
    height: 66rem !important;
    border: none !important;
    box-shadow: 1px 1px 20px 1px rgb(0 0 0 / 7%);
}

.viewer-box .toolbar {
    background: #fff;
}

/* Transcription & translation exercises
   ========================================================================== */

.exercise label {
    display: block;
    color: #001158;
    font: 700 1.6rem/1.2 Vestula, sans-serif;
    margin: 2.4rem 0 .8rem;
}

.exercise details {
    margin: 1.6rem 0;
    font-size: 1.6rem;
}

.exercise summary {
    cursor: pointer;
    color: #b27f2b;
    font: 1.6rem/1.4 Vestula, sans-serif;
}

.exercise details[open] > summary {
    margin-bottom: 1rem;
}

.exercise details > :not(summary) {
    color: #505961;
}

.extra-symbols {
    font: 1.4rem/1 Vestula, sans-serif;
    color: #666;
    margin-top: 1.6rem;
}

.extra-symbols button {
    font: 1.8rem/1 PTSerif, Georgia, serif;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: .3rem .9rem;
    margin-left: .4rem;
    cursor: pointer;
}

.extra-symbols button:hover {
    border-color: #b27f2b;
}

.transcript {
    display: block;
    font: 2rem/1.6 PTSerif, Georgia, serif;
    background: #f5f5f5;
    border: none;
    width: 100%;
    min-height: 21rem;
    padding: 2rem;
    margin: 1rem 0;
    resize: vertical;
}

.transcript:focus {
    outline: 2px solid rgb(178 127 43 / 40%);
}

.check-options {
    font: 1.5rem/1.4 Vestula, sans-serif;
    color: #505961;
    margin-bottom: 1.6rem;
}

.check-options label {
    display: inline;
    color: inherit;
    font: inherit;
    margin: 0 2rem 0 .4rem;
}

.transcript__submit {
    background: #001158;
    color: #fff;
    border: none;
    padding: 7px 20px 6px;
    border-radius: 3px;
    font: 14px/1 Vestula, sans-serif;
    cursor: pointer;
}

.transcript__submit:hover {
    background: #7f88ab;
}

.check-result {
    display: block;
    min-height: 5rem;
    margin: 1rem 0 2rem;
    padding: 2rem;
    background: #fbf8f2;
    border-left: 3px solid #b27f2b;
    font-size: 2rem;
}

.error-message {
    font-style: italic;
    font-weight: bold;
}

.full-transcript {
    border-top: 1px dotted #ccc;
    padding-top: 1rem;
}

.translation-result {
    min-height: 5rem;
    padding: 2rem;
    background: #f5f5f5;
    white-space: pre-line;
}

/* Footer
   ========================================================================== */

.footer {
    clear: both;
    overflow: auto;
    margin-top: 8rem;
    padding: 4rem 0;
    font: 1.5rem/1.8 Vestula, sans-serif;
    background: #e3e3e3 url(/images/world-map.png) 50% 3rem no-repeat;
}

.footer__section {
    float: left;
    width: 33%;
}

.footer__header {
    font: 700 1.8rem/1.15 Vestula, sans-serif;
    color: #666;
    margin-bottom: 1rem;
}

.footer__list {
    list-style: none;
}

.footer__link {
    text-decoration: none;
    color: #666;
}

.footer__link:hover {
    color: #b27f2b;
}

/* Responsive
   ========================================================================== */

@media only screen and (max-width: 1180px) {
    .wrapper__full {
        max-width: 90%;
    }
    .hero img {
        max-width: 49%;
        margin-left: 40px;
    }
    .hero figure {
        width: 100%;
        float: none;
    }
    .inner-content {
        width: 91%;
    }
}

@media only screen and (max-width: 940px) {
    /* The seal would overlap the (longer) site name: put it above instead */
    .header__wrapper {
        padding-top: 2rem;
    }
    .header__ullogo {
        position: static;
        display: block;
        width: 11rem;
        margin: 0 auto;
    }
    .header__logo {
        padding-top: 1.6rem;
    }
    .hero img {
        max-width: 39%;
        margin-left: 20px;
    }
}

@media only screen and (max-width: 768px) {
    .hero {
        height: auto;
        padding-bottom: 4rem;
    }
    .hero h1 {
        padding-top: 60px;
        width: 100%;
        font-size: 32px;
        float: none;
    }
    .hero figure {
        display: none;
    }
    .home-text,
    .home-lessons {
        float: none;
        width: 100%;
        margin-left: 0;
    }
    .wrapper__full--top {
        margin-top: 6rem;
    }
    .wrapper__medium {
        max-width: 90%;
    }
    .courselist li {
        clear: left;
        float: none;
        width: 100%;
        margin-left: 0;
    }
    .intro,
    .about-content,
    .inner-content {
        width: 100%;
    }
    .viewer-box .viewer {
        height: 50rem !important;
    }
}

@media only screen and (max-width: 550px) {
    .navigation__toggle {
        display: block;
        position: absolute;
        top: 2.4rem;
        right: 1.4rem;
        font-size: 3rem;
        cursor: pointer;
    }
    .navigation__toggle:hover {
        color: #b27f2b;
    }
    .navigation__checkbox:checked ~ .navigation__list {
        display: block;
    }
    .navigation__item {
        display: block;
        padding: 0;
        border-top: 1px dotted #ccc;
    }
    .navigation__link {
        display: block;
        padding: 1.5rem;
    }
    .header__ullogo {
        display: none;
    }
    .header__logo {
        padding: 2.4rem 0 .4rem;
        text-align: left;
    }
    .header__logolink {
        font-size: 2.6rem;
    }
    .header__logolink span {
        display: block;
    }
    .language-switch {
        top: 3.4rem;
        right: 5.6rem;
    }
    .navigation__list {
        display: none;
        margin-top: 2rem;
    }
    .header__box {
        padding-bottom: 1.5rem;
    }
    .wrapper__full {
        max-width: 85%;
    }
    .page-title {
        font-size: 3rem;
        padding-top: 4rem;
    }
    .inner-content {
        padding: 3rem 2rem;
    }
    .courselist img {
        width: 100%;
        height: auto;
    }
    .footer__section {
        width: 100%;
    }
    .viewer-box .viewer {
        height: 40rem !important;
    }
}
