@font-face {
    font-family: 'liberation_mono';
    src: url('fonts/LiberationMono-Regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'liberation_mono';
    src: url('fonts/LiberationMono-Bold-webfont.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #fbffee;
    --primary: #a74165;
    --hover: #c94573;
    --secondary: #7d314c;
    --dark-400: #360036;
    --dark-600: #2a002a;
    --dark-800: #1d0029;
    --cursor: url('./img/near-me.svg'), pointer;
}

::selection {
    color: var(--bg, #fbffee);
    background-color: var(--secondary, #7d314c);
}

html {
    line-height: 1.15; /* 1 */
    -webkit-text-size-adjust: 100%; /* 2 */
}

body {
    position: relative;
    font-family: 'liberation_mono', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    margin: 0 auto;
    background: var(--bg, #fbffee);
    color: var(--dark-800, #1d0029);
    overflow-x: hidden;
    padding: 0 1rem;
    width: 100%;
    max-width: 62rem;

    /* Thx for the tip: https://css-tricks.com/linearly-scale-font-size-with-css-clamp-based-on-the-viewport/ */
    font-size: clamp(1rem, 0.9333rem + 0.3333vw, 1.2rem);
    line-height: 1.45em;
    min-height: 100vh;
}

button {
    appearance: none;
    font-family: 'liberation_mono', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
}

main::before,
main::after {
    content: '';
    clear: both;
    display: table;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.22em;
}

h2,
h3,
h4,
h5,
h6,
a {
    color: var(--primary, #a74165);
}

h1 {
    color: var(--secondary, #7d314c);
    font-size: clamp(1.8rem, 1.3333rem + 2.3333vw, 3.2rem);
}

h2 {
    font-size: clamp(1.36rem, 1.08rem + 1.4vw, 2.2rem);
}

h3 {
    font-size: clamp(1.2rem, 0.9833rem + 1.0833vw, 1.85rem);
}

h4 {
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem);
}

h5 { font-size: 1rem; }
h6 { font-size: 0.8rem; }

a {
    font-weight: bold;
    text-decoration-style: solid;
    text-decoration-color: var(--primary, #a74165);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all 0.15s linear;
    cursor: var(--cursor, pointer);
}

:focus {
    outline: 2px dotted var(--dark-800, #1d0029);
    outline-offset: 4px;
    outline-style: dotted;
}

a:active {
    color: var(--secondary, #7d314c);
    text-decoration-color: var(--secondary, #7d314c);
}

b,
strong,
ul li::marker {
    color: var(--secondary, #7d314c);
}

hr {
    border-color: var(--dark-800, #1d0029);
    border-width: 2px;
    border-style: dotted;
    margin: 2.5rem 0;
}

.Headerbar {
    position: relative;
    width: 100%;
    margin-bottom: auto;
    padding-right: clamp(8.5rem, 5.4048rem + 15.4762vw, 15rem);
    min-height: clamp(10.313rem, 7.7719rem + 11.294vw, 15rem);
}

.Headerbar__link {
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
    width: clamp(6.5rem, 2.4524rem + 20.2381vw, 15rem);
    z-index: 1;
}

.Headerbar__lang {
    position: absolute;
    bottom: -12%;
    right: clamp(1rem, -0.3554rem + 6.0241vw, 3.5rem);
    width: clamp(3rem, 1.9157rem + 4.8193vw, 5rem);
    height: clamp(3rem, 1.9157rem + 4.8193vw, 5rem);
    perspective: 1000px;
    z-index: 2;
}

.Headerbar__lang-btn {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 50%;
    appearance: none;
    background-color: transparent;
    color: var(--bg, #fbffee);
    font-size: 0.75rem;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    transition: transform 0.3s linear, background-color 0.15s linear;
    transform-style: preserve-3d;
    cursor: var(--cursor, pointer);
}

.Headerbar__lang-btn.is-de {
    transform: rotateY(180deg);
}

.Headerbar__lang-flip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background-color: var(--primary, #a74165);
    border-radius: 50%;
    transition: background-color 0.15s linear;
}

.Headerbar__lang-text {
    position: absolute;

    /* 7px - 13px, 360px - 1024px */
    top: clamp(0.4375rem, 0.2341rem + 0.9038vw, 0.812575rem);
    left: clamp(0.4375rem, 0.2341rem + 0.9038vw, 0.812575rem);
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
    width: clamp(2.125rem, 1.4134rem + 3.1627vw, 3.4375rem);
    height: clamp(2.125rem, 1.4134rem + 3.1627vw, 3.4375rem);
    font-style: normal;
    border: 1px solid var(--bg, #fbffee);
    border-radius: 50%;
}

.Headerbar__lang-flip--de {
    transform: rotateY(180deg);
}

.Headerbar__lang-btn:active .Headerbar__lang-flip {
    background-color: var(--secondary, #7d314c);
}

.Footerbar {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    margin-top: auto;
    width: 100%;
    text-align: center;
}

.Footerbar__text {
    margin: 0;
}

.Footerbar__link {
    display: inline-block;
    vertical-align: middle;
    padding: 8px;
    line-height: 1;
}

.Footerbar__social {
    width: 1.2rem;
}

@media (hover: hover) {
    a:hover {
        color: var(--hover, #c94573);
        text-decoration-color: var(--hover, #c94573);
    }

    .Headerbar__lang-btn:hover .Headerbar__lang-flip {
        background-color: var(--hover, #c94573);
    }
}

@media only screen and (min-width: 480px) {
    .Footerbar__text {
        display: inline-block;
    }
}

@media only screen and (min-width: 768px) {
    body {
        display: flex;
        flex-flow: column wrap;
        padding: 0 2rem;
    }

    .Headerbar {
        margin: 2rem 0 auto;
    }

    .Headerbar__lang {
        bottom: -5%;
    }

    .Headerbar__lang-text {
        border-width: 2px;
    }
}

@media only screen and (min-width: 1024px) {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 { margin: 0.9em 0; }

    h1 {
        margin-bottom: 0;
    }
}
