:root {
    --green: #1d9b6c;
    --dark: #313131;
    --bg: #f2f2f2;
    --nav-height: 56px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    background: var(--bg);
}

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    color: #222;
    overflow-x: hidden;
}

a {
    color: var(--green);
    font-weight: bold;
    text-decoration: none;
}

a:hover {
    color: inherit;
}

p {
    font-size: 1.15em;
    line-height: 1.5;
}

/* --- navigatie --- */

.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(16px, calc((100% - 1140px) / 2));
    transition: background .4s ease-in-out;
}

.navbar ul {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar a {
    color: white;
    text-transform: uppercase;
    font-weight: 700;
    transition: color .2s ease-in;
}

.navbar .brand {
    font-size: 1.2em;
}

.navbar a:hover {
    color: var(--green);
}

.navbar.scrolled {
    background: white;
    border-bottom: 1px solid black;
}

.navbar.scrolled a {
    color: black;
}

.navbar.scrolled a:hover {
    color: var(--green);
}

/* --- intro --- */

.intro {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    text-align: center;
    color: white;
    background: url(../img/nature-sky-sunset-man_small.png) center / cover no-repeat;
}

@media (min-width: 768px) {
    .intro {
        background-image: url(../img/nature-sky-sunset-man.png);
    }
}

.intro h1 {
    margin: 0;
    font-size: clamp(2.5em, 10vw, 4em);
    font-weight: 700;
    text-transform: uppercase;
}

.intro-text {
    margin: 30px 0;
    font-size: 1.4em;
    font-family: 'Architects Daughter', cursive;
}

.intro em {
    font-size: 1.4em;
}

.btn-down {
    display: inline-block;
    position: relative;
    height: 50px;
    width: 50px;
    border: 2px solid white;
    border-radius: 50%;
    background: rgba(0, 0, 0, .2);
}

.btn-down::after {
    content: "";
    position: absolute;
    top: 28%;
    left: 35%;
    height: 30%;
    width: 30%;
    transform: rotate(45deg);
    border-right: 1px solid white;
    border-bottom: 1px solid white;
}

.btn-down:hover {
    background: rgba(0, 0, 0, .3);
    animation: pulsate 1s ease-out infinite;
}

@keyframes pulsate {
    50% { transform: scale(1.2); }
}

/* --- over boekmap --- */

#about {
    display: flex;
    background: white;
}

.about-image {
    flex: 0 0 33%;
    background: url(../img/vintage-old-book.png) center / cover;
}

.about-text {
    flex: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px 50px;
}

@media (max-width: 1199px) {
    .about-image {
        display: none;
    }
}

h2 {
    padding: 60px 0 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid black;
    font-size: 2em;
}

h2 em {
    font-style: inherit;
    border-bottom: 3px solid var(--green);
    padding-bottom: 21px;
}

.legend {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
    text-align: center;
}

.legend img {
    display: block;
    width: 32px;
    margin: 0 auto 20px;
}

.text-btn {
    border: 2px solid var(--green);
    text-transform: uppercase;
    font-size: .9em;
    font-weight: 700;
    color: var(--green);
    padding: 5px 15px;
}

/* --- kaart --- */

#map-container {
    position: relative;
    height: calc(100vh - var(--nav-height));
}

#map {
    height: 100%;
    width: 100%;
    background: #b3bdbb;
}

#search {
    position: absolute;
    top: 10px;
    left: 50px;
    width: min(340px, calc(100% - 66px));
}

#search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    font: inherit;
    outline: none;
}

#search-input:focus {
    border-color: var(--green);
}

#search-results {
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

#search-results li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: .9em;
    border-top: 1px solid #eee;
}

#search-results li:hover,
#search-results li:focus {
    background: #eef7f3;
    outline: none;
}

#search-results li.empty {
    cursor: default;
    color: #777;
}

.msg-box {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: min(360px, calc(100% - 32px));
    padding: 25px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 0 5px 2px rgba(184, 184, 184, 1);
    text-align: center;
    cursor: pointer;
}

.msg-box h3 {
    margin-top: 0;
}

.popup {
    position: relative;
    width: min(300px, 80vw);
    max-height: 60vh;
    overflow-y: auto;
    padding: 16px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

.popup[hidden] {
    display: none;
}

.popup-close {
    position: absolute;
    top: 4px;
    right: 8px;
    border: 0;
    background: none;
    font-size: 1.5em;
    cursor: pointer;
}

.popup h3 {
    margin: 0 24px 8px 0;
    font-size: 1.3em;
}

.popup img {
    float: left;
    width: 70px;
    margin: 0 12px 8px 0;
}

.popup p {
    font-size: 1em;
    margin: 0 0 10px;
}

.popup .description {
    clear: both;
    font-size: .9em;
    color: #444;
}

/* --- footer --- */

footer {
    padding: 40px 16px;
    background: var(--dark);
    color: var(--bg);
    font-size: .8em;
    text-align: center;
}

.osm-tiles {
    filter: grayscale(.4);
}
