/* ------------------------------------ */
/*       GLOBAL PROJECT STYLESHEET      */
/* ------------------------------------ */

/* ---------- Color Reference --------- */
/* #262014 - dark, background
/* #F2F0E5 - light, text
/* #F0AA11 - yellow, accent
/* ------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}


/* ----------- Custom Fonts ----------- */
@font-face {
    font-family: LibreBaskerville;
    src: url('../fonts/LibreBaskerville-Regular.ttf');
    font-style: normal;
    font-weight: normal;
}
@font-face {
    font-family: LibreBaskerville;
    src: url('../fonts/LibreBaskerville-Bold.ttf');
    font-style: normal;
    font-weight: bold;
}
@font-face {
    font-family: LibreBaskerville;
    src: url('../fonts/LibreBaskerville-Italic.ttf');
    font-style: italic;
    font-weight: normal;
}
@font-face {
    font-family: SourceSans;
    src: url('../fonts/SourceSans3-VariableFont_wght.ttf');
    font-style: normal;
}
@font-face {
    font-family: SourceSans;
    src: url('../fonts/SourceSans3-Italic-VariableFont_wght.ttf');
    font-style: italic;
}

/* --------- Basic Font Styles -------- */
body { font-family: SourceSans; }
h1, h2, h3, h4, h5, h6 { font-family: LibreBaskerville; font-weight: bold; }

/* --------- Basic Color Styles ------- */
* { scrollbar-color: #6C614D #262014; }
body { 
    color: #F2F0E5;
    background-color: #262014;
}
::selection {
    background: #546d83;
}

/* --------- Basic Size Styles --------- */
h2 { font-size: 1.85em; }
h3 { font-size: 1.35em; }


/* ----------- Custom Anchors ---------- */
.anchor[name="tour"] { scroll-margin-top: 160px; }
.anchor[name="production"] { scroll-margin-top: 100px; }
.anchor[name="genealogies"] { scroll-margin-top: 45px; }
.anchor[name="bibliography"] { scroll-margin-top: 45px; }

/* ------------------------------------- */




/* ---------------- Navbar ------------- */
.navbar {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
    padding: 0 1em;
    background-color: #262014;
}
.navbar ul {
    display: flex;
    align-items: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.navbar ul li {
    font-size: 0.9em;
    padding: 0.8em 1.5em;
}
.navbar a:link, .navbar a:visited {
    text-decoration: none;
    color: #F2F0E5;
    transition: 0.2s;
}
.navbar a:hover, .navbar a:active {
    color: #F0AA11;
}
.hamburger {
    display: none;
}

@media only screen and (max-width: 1050px) {
    .navbar ul {
        position: fixed;
        top: -70%;
        left: 0;
        flex-direction: column;
        width: 100%;
        background-color: #262014;
        transition: 0.5s;
    }
    .navbar ul li {
        padding-top: 0.5em;
        padding-bottom: 1.5em;
    }

    .navbar ul.active {
        left: 0;
        top: 64px;
    }

    .hamburger {
        display: block;
        cursor: pointer;
    }
}

/* ------------- Title Splash ---------- */
.titlesplash {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(56,50,39,0.6), rgba(56,50,39,0.4) 20% 80%, rgba(56,50,39,0.6)), url('../img/splash_map_cropped.png');
    background-position: 50% 50%;
    height: 85vh;
    padding: 1em;
}
.titlesplash h1 {
    margin: 0;
    text-align: center;
    font-size: 3em;
    text-shadow: 2px 4px 4px rgba(56,50,39,0.5);
    padding: 0 1em;
}

@media only screen and (max-width: 1050px) {
    .titlesplash h1 { font-size: 2.5em; }
}
@media only screen and (max-width: 750px) {
    .titlesplash h1 { font-size: 2em; }
    .titlesplash img { 
        height: 28px;
    }
}

/* --------------- Map Tour ------------ */
.tour h2 { margin: 2.5em auto 1em; text-align: center; }
.tour { margin: 2.5em 0; }

.tour .container {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    gap: 2em;
    margin: 0 1.5em;
}

.textbox {
    width: 450px;
    aspect-ratio: 450/572;
    background-color: #484236;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 6fr 1fr;
    grid-template-areas:
        "title title"
        "content content"
        "buttonA buttonB";
    padding: 1em;
}
#section_title {
    grid-area: title;
    font-size: 1.35em;
    margin: 0 1rem;
}
#section_text {
    grid-area: content;
    line-height: 1.45;
    font-size: 1.15em;
    margin: 0 1rem;
    scrollbar-color: #6C614D #383227;
}
#section_text p { margin-top: 0; }
.textbox button {
    border: none;
    cursor: pointer;
    background-color: #484236;
    transition-duration: 0.2s;
}
.textbox button:hover { background-color: #6C614D; }
.textbox button.first_button { background-color: #6C614D; }
.textbox button.first_button:hover { background-color: #484236; }
.icon {
    width: 1.5em;
    height: 1.5em;
    vertical-align: -0.125em;
}

p#first_para {
    text-align: center;
    font-size: 1.3em;
    width: 80%;
    margin: 25% auto 0;
}

.mapbox {
    background-color: #262014;
    overflow: hidden;
    width: 800px;
    aspect-ratio: 7/5;
}
.mapbox img { width: 100%; }

#tour_map { 
    transition: transform 0s ease-in-out; 
    transform: scale(0.7) translate(0%, -18%);
}

.tour p.caption {
    width: 900px;
    margin: 2em auto;
}

@media only screen and (max-width: 1250px) {
    .tour h2 { font-size: 1.75em; }
    #section_title { font-size: 1.3em; }
    #section_text { font-size: 1.1em; }
}
@media only screen and (max-width: 1150px) {
    .tour .container {
        flex-flow: column nowrap;
        gap: 1.5em;
    }
    .textbox {
        grid-template-rows: 2fr 6fr 2fr;
        width: 700px;
        height: 320px;
        padding: 0.75em;
    }
    #section_title { font-size: 1.2em; }
    #section_text { font-size: 1.05em; }
    .mapbox {
        width: 700px;
    }
    .tour p.caption { width: 700px; }
    p#first_para {
        width: 70%;
        margin: 5% auto 0;
    }
}
@media only screen and (max-width: 725px) {
    .tour h2 { font-size: 1.6em; }
    .tour .container {
        gap: 1.2em;
    }
    .textbox {
        width: 550px;
        height: 300px;
        padding: 0.5em;
    }
    #section_title { font-size: 1.1em; }
    #section_text { font-size: 1em; }
    .mapbox {
        width: 550px;
    }
    .tour p.caption { width: 550px; }
}
@media only screen and (max-width: 580px) {
    .tour .container {
        gap: 1.1em;
    }
    .textbox {
        width: 100%;
        height: 350px;
        grid-template-rows: 1fr 4fr 1fr;
    }
    .mapbox {
        width: 100%;
    }
    #section_title { font-size: 1em; }
    #section_text { font-size: 0.9em; }
    .tour p.caption { width: auto; margin: 2em 1.5em; }
}

/* --------------- Content ------------- */
.content {
    width: 650px;
    margin: auto;
}
.content img.figure { 
    display: block;
    width: 450px;
    margin: 3em auto 1em; 
}
.figure-flex {
    display: flex;
    flex-flow: row wrap;
    gap: 1em;
    justify-content: center;
    text-align: center;
    margin: 3em auto 1em; 
}
.figure-flex img { display: block; }

.content h2 { text-align: center; }
.content p {
    line-height: 1.45;
    font-size: 1.15em;
}

.genealogies { margin-top: 2.5em; }

p.caption {
    font-size: 0.85em;
    text-align: center;
    margin-bottom: 2.5em;
}

.content a:link, .content a:visited { color: #F0AA11; }
.content a:hover, .content a:active { color: #f6d783; }

@media only screen and (max-width: 1250px) {
    .content { width: 615px; }
    .content p { font-size: 1.1em; }
    .content h2 { font-size: 1.75em; }
    p.caption { font-size: 0.85em; }
}

@media only screen and (max-width: 725px) {
    .content { width: 500px; }
    .content p { font-size: 1em; }
    .content h2 { font-size: 1.6em;}
    p.caption { font-size: 0.75em; }
}

@media only screen and (max-width: 560px) {
    .content, .figure-flex.titles { width: auto; margin: 0 1.5em;}
    .content p { font-size: 1em; }
    .content h2 { font-size: 1.6em;}
    p.caption { font-size: 0.75em; }
    .content img.figure { width: 100%; }
    .figure-flex.titles img { 
        width: 100%;
    }
}

/* ------------- Bibliography ----------- */
.bibliography {
    width: 650px;
    margin: auto;
}
.bibliography h2 {
    text-align: center;
    margin-top: 3em;
}
.bibliography h3 { margin-top: 2.5em; }
.bibliography p {
    line-height: 1.25;
    font-size: 1.1em;
}

.bibliography .sources { padding-left: 2em; }
.bibliography .sources p:first-letter { margin-left: -2em; }

@media only screen and (max-width: 1250px) {
    .bibliography { width: 615px; }
    .bibliography p { font-size: 1.05em; }
    .bibliography h2 { font-size: 1.75em; }
    .bibliography h3 { font-size: 1.3em; }
}

@media only screen and (max-width: 725px) {
    .bibliography { width: 500px; }
    .bibliography p { font-size: 0.95em; }
    .bibliography h2 { font-size: 1.6em; }
    .bibliography h3 { font-size: 1.25em; }
}

@media only screen and (max-width: 560px) {
    .bibliography { width: auto; margin: 0 1.5em; }
    .bibliography p { font-size: 0.9em; }
    .bibliography h2 { font-size: 1.55em; }
    .bibliography h3 { font-size: 1.2em; }
}

/* ---------------- Footer -------------- */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 100px;
    margin-bottom: 30px;
}
.footer p { line-height: 1.5; }

@media only screen and (max-width: 1250px) {
    .footer p { font-size: 0.95em; }
}

@media only screen and (max-width: 725px) {
    .footer p { font-size: 0.9em; }
}

@media only screen and (max-width: 560px) {
    .footer p { font-size: 0.8em; }
}
