* {
    box-sizing: border-box;
}

/* Base */

html,
body {
    margin: 0;
    width: 100vw;

    font-family: "powell", sans-serif;
    background: #663024;
    color: #fff;
    overflow: hidden;
}

/* Typography */

.meter-display {
    color: #663024;
    font-family: "powell", sans-serif;
    font-style: normal;
    font-weight: 400;
    line-height: 0.9;
    margin: 0;

    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

[data-screen="cover"] .meter-display {
    color: white;
}

#coverMeters {
    color: #fff;
}

h2 {
    margin: 0;

    color: #fff;
    font-family: "powell", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-transform: uppercase;
}

.screen.article-screen h2 {
    color: #663024;
}

body.is-article-screen .nav-bar h2 {
    color: #663024;
}

body.is-article-screen .nav-bar .cursor {
    background: #663024;
}

body.is-article-screen .nav-bar .cursor::after {
    background: #663024;
}


h3 {
    color: #663024;
    text-align: center;
    font-family: "powell", sans-serif;
    font-size: 46px;
    font-style: normal;
    font-weight: 400;
    line-height: 0.85;
    text-transform: uppercase;
    margin: 1rem;
}

h4 {
    text-align: center;
    font-family: "powell", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin: 0;
}

.author {
    color: #663024;
}

.calltoaction-svg {
    width: 100%;
    overflow: visible;
}

.calltoaction {
    font-family: "powell", sans-serif;
    font-size: 48px;

    fill: transparent;
    stroke: #fff;
    stroke-width: 10px;
    stroke-linejoin: round;
    paint-order: stroke fill;
}

p {
    margin: 0;
    font-family: "powell", sans-serif;
    font-size: 1.2rem;
    line-height: 1.2;
}

.eyebrow {
    padding-top: 2rem;

    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;

    font-size: 0.8rem !important;
    opacity: 0.7;
}

.status-text,
.hint {
    font-size: 0.95rem !important;
    opacity: 0.7;
}

/* Screens */

.screen {
    display: none;
    padding: 1rem;
}

.screen h1 {
    font-size: 5rem;
    color: #fff;
    font-family: "powell", sans-serif;
    font-style: normal;
    font-weight: 400;
    line-height: 0.9;
    margin: 0;
}


.screen.is-active {
    position: relative;

    display: flex;
    flex-direction: column;

    padding: 3.8rem 1rem 1rem;
}

/* Buttons */

button {
    position: absolute;
    right: 1rem;
    bottom: 1rem;

    width: 10rem;
    margin-top: 1rem;
    padding: 0.5rem;

    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;

    font: inherit;
    cursor: pointer;
}

#permissionButton {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1rem;
    width: calc(100vw - 2rem);
    border-radius: 0%;
    border: 1px solid #663024;
    height: 2.5rem;
    box-sizing: border-box;
    font-size: 1.2rem;
}

/* Overlay */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;

    display: none;
    padding: 1rem;

    background: #fff;
}

.overlay.is-visible {
    display: flex;
    flex-direction: column;
}

.overlay-card {
    width: 100vw;
    height: 100vh;

    background: #fff;
    color: #663024;
}

.overlay-card p {
    font-size: 1.6rem;
}

.status-text {
    padding: 0 !important;
}

.access-question {
    position: absolute;
    bottom: 5rem;
    left: 1rem;
}

/* Navigation */

.nav-bar {
    position: fixed;
    top: env(safe-area-inset-top);
    left: 0;
    z-index: 10;

    width: 100%;
    padding: 0.7rem 1rem;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.toc,
.category,
.target-compass {
    display: flex;
}

.toc {
    width: 4rem;
    justify-content: space-between;
}


.category-field {
    position: fixed;

    left: 50%;
    transform: translateX(-50%);

    width: 12rem;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 5;
}

.category {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title {
    position: fixed;

    left: 50%;
    top: calc(env(safe-area-inset-top) - 0.1rem);

    transform: translateX(-50%);

    height: 30px;
    display: flex;
    align-items: center;

    white-space: nowrap;
    z-index: 5;
}

[data-screen="article"] .category-title {
    position: fixed;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
}

.cursor {
    position: relative;
    transition: none;
}

.cursor.is-detached {
    position: fixed;
    z-index: 10002;
    margin-top: 0;
    left: var(--cursor-x);
    top: var(--cursor-y);
    transform: translate(-50%, -50%);
}

.cursor {
    --compass-dot-x: 0px;
    --compass-dot-y: -13px;

    position: relative;

    width: 18px;
    height: 18px;
    margin-top: 0.1rem;

    border-radius: 50%;
    background: currentColor;
}

.cursor::after {
    content: "";

    position: absolute;
    left: 50%;
    top: 50%;

    width: 4px;
    height: 4px;

    border-radius: 50%;
    background: currentColor;

    transform: translate(calc(-50% + var(--compass-dot-x)),
            calc(-50% + var(--compass-dot-y)));
}

/* Cover */

[data-screen="cover"] {
    --split: 100%;

    background: linear-gradient(180deg,
            #663024 0%,
            #663024 calc(var(--split) - 10%),
            #6f5c73 var(--split),
            #8aa0dd calc(var(--split) + 10%),
            #8aa0dd 100%);

    height: 100vh;
}

.cover-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    margin-top: 4rem;
}

.cover-title h1:last-child {
    align-self: flex-end;
}

/* Walking */

.meter-display {
    position: fixed;
    left: 50%;

    transform: translateX(-50%);

    font-size: 5.2rem;
    text-align: center;
}

.walk-animation {
    position: absolute;
    top: 0;
    left: -1rem;
    height: 100vh;
}

.walk-animation img {
    height: 100%;
    width: auto;
    margin-left: -4rem;
}


.walking-animation {
    position: relative;
    overflow: hidden;

    width: min(80vw, 520px);
    height: 220px;
    margin: 1.5rem 0;

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 1rem;
}

.walking-animation::before {
    content: "";

    position: absolute;
    left: var(--walk-progress, 0%);
    top: 50%;

    width: 120px;
    height: 120px;

    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);

    transform: translate(-50%, -50%);
    transition: left 0.4s ease;
}

/* Bottom Status */

.bottom-progress {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 10;

    font-size: 0.85rem;
    opacity: 0.75;

    pointer-events: none;
}

/* Compass Screens */

.compass-screen {
    position: relative;
    overflow: hidden;

    background: #663024;
    padding: 0;
    height: 100vh;
}

/* Animierter Gradient-Layer */
.compass-screen::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 0;

    background: linear-gradient(180deg,
            #663024 0%,
            #8AA0DD 39.9%,
            #FFF 93.27%);

    transform: translateY(100%);
    transition: transform 700ms ease;
    pointer-events: none;
}

.compass-screen.is-compass-locked::before {
    transform: translateY(0);
}

/* Inhalte liegen über dem Gradient */
.compass-screen>* {
    position: relative;
    z-index: 1;
}

.compass-screen.is-active {
    display: flex;
    flex-direction: column;

    height: 100vh;
    padding: 0;
    overflow: hidden;
}

/* Compass Layout */

.compass-container {
    flex: 1;
    width: 100%;
    min-height: 0;
    position: absolute;
    top: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
}

.compass-wrapper {
    position: relative;

    width: 80vw;
    height: calc(100dvh - env(safe-area-inset-top) - 4.5rem);
    margin: 1rem auto 0;
    box-sizing: border-box;
    padding-bottom: 4rem;
}

.compass-oval {
    position: relative;

    width: 100%;
    height: 100%;

    border: 1px solid currentColor;
    border-radius: 50%;
}

/* Target */

.target-compass {
    position: absolute;
    top: -0.6rem;
    left: 50%;
    z-index: 5;

    display: flex;
    column-gap: 1.5rem;

    transform: translateX(-50%);
    pointer-events: none;
}

/* State 1 Question */

.compass-question {
    position: fixed;
    font-size: 1.6rem;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

.compass-question-path {
    display: none;
    position: absolute;
    overflow: visible;
}

.compass-question-path.is-active {
    display: block;
}

#compass-category {
    top: 30vh;
    left: 1rem;
}

#compass-article {
    top: 50vh;
    left: 1rem;
}

.compass-screen.is-compass-locked .compass-question {
    display: none;
}

/* State 2 Preview */

.compass-preview {
    position: absolute;
    inset: 0;
    z-index: 10;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 2rem 0;

    opacity: 0;
    pointer-events: none;


    transition: opacity 300ms ease;
}

.compass-screen.is-compass-locked .compass-preview {
    opacity: 1;
}

.compass-preview-head {
    position: fixed;
    z-index: 20;

    top: 4rem;
    left: 1rem;

    width: calc(100vw - 2rem);

    text-align: center;
    pointer-events: none;
}

[data-compass-preview-title] {
    position: static;

    width: 100%;
    margin: 0 0 0.5rem;
    padding: 0;

    color: #663024;
    text-align: center;
    font-family: "powell", sans-serif;
    font-size: 46px;
    font-style: normal;
    font-weight: 400;
    line-height: 0.85;
    text-transform: uppercase;

    hyphens: auto;
}

[data-compass-preview-author] {
    position: static;

    display: block;
    width: 100%;

    margin: 0;
    padding: 0;

    color: #663024;
    text-align: center;
    font-family: "powell", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

[data-compass-preview-description] {
    margin-bottom: -2rem;
    color: #663024;
    text-align: start;
    font-family: "powell", sans-serif;
    font-size: 1.2rem;
    line-height: 1.2;
    width: 90vw;
    position: absolute;
    z-index: 20000;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    hyphens: auto;
}

/* Compass Dots */

.dot {
    position: absolute;
    z-index: 4;

    width: 1.5rem;
    height: 1.5rem;

    border-radius: 50%;
    background-color: #663024;
    border: 1px solid #fff;

    transform: translate(-50%, -50%);
}

.dot.is-locked {
    background: #fff;
}

.compass-screen.is-compass-locked .dot {
    background-color: var(--dot-bg, transparent);
}

.compass-screen.is-compass-locked .dot.is-locked {
    background: #fff;
}

/* Compass Eyebrow */

.compass-screen>.eyebrow {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 8;

    padding: 0;

    transform: translateX(-50%);
}

[data-screen="compass"] {
    height: 100vh;
}

/* Intro */

[data-screen="article-intro"] {
    background-color: #fff;
}

[data-screen="tracing"],
[data-screen="three-miles"] {
    background-color: #fff;
    padding: 3rem 1rem 0 1rem;
}

.article-gradient {
    background: linear-gradient(180deg, #8AA0DD 0%, rgba(138, 160, 221, 0.00) 80%);
    position: absolute;
    z-index: 0;
    width: 100vw;
    top: 95vh;
    left: 0;
    height: 50vh;
}

.article-text {
    color: #663024;
    text-indent: 35px;
}

.welcome,
[data-compass-calibration-question] {
    color: #fff;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 70%;
    transform: translate(-50%, -50%);
    width: 70vw;
    font-family: "powell", sans-serif;
    font-size: 1.6rem !important;
    line-height: 1.2;
    text-transform: none;
}

[data-screen="calibration-intro"] {
    background-color: #8AA0DD;
    height: 100vh;
}

[data-screen="calibration-walking"] {
    background-color: #8AA0DD;
    height: 100vh;
}

[data-screen="calibration-intro"] .meter-display {
    color: #fff;
}

[data-screen="calibration-turning"] {
    background-color: #8AA0DD;
    height: 100vh;
}

[data-screen=calibration-cursor] {
    background-color: #663024;
    height: 100vh;
}

[data-screen="calibration-final"] {
    height: 100vh;
    background-color: #8AA0DD;
}

.img-intro {
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

.article-head {
    margin-bottom: 7rem;
    position: relative;
    z-index: 3;
}

.next-article {
    background: linear-gradient(180deg, #FFF 0%, #663024 100%);
    width: 100vw;
    height: 80vh;
    margin-left: -1rem;
}

html,
body {
    overflow-x: hidden;
}

[data-screen="article"] {
    display: none;
    padding: 3rem 1rem 100vh 1rem;
    box-sizing: border-box;
    background: #fff;
    min-height: 100vh;
    touch-action: none;
}

[data-screen="article"].is-active {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 3rem 1rem 0 1rem;
    background-color: #FFF;
}

[data-screen="calibration-scrolling"] {
    height: 100vh;
    overflow: hidden;
    touch-action: none;
    padding: 3rem 1rem 0 1rem;
}

[data-screen="calibration-scrolling"] .scroll-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    transform: translateY(0);
    will-change: transform;
}

.scroll-container {
    position: relative;
    top: 3rem;
    height: 180vh;
    z-index: 1;
}

[data-screen="cover"] .path-text {
    font-size: 1.6rem;
}

.scrolltext {
    position: absolute;
    top: 60vh;
    left: 0;

    width: calc(100vw - 2rem);

    font-size: 1.6rem;
    color: #fff;

    transform: translateX(-110vw);
    opacity: 1;

    will-change: transform;
    pointer-events: none;
}

.continuedown {
    position: absolute;
    top: 90vh;
    left: 0;
    font-size: 1.6rem;
    color: #fff;
    text-align: center;
}

.container-down {
    background: linear-gradient(180deg, rgba(138, 160, 221, 0.00) 0%, #8AA0DD 50%);

    bottom: 0;

    transform: translateY(50vh);
    opacity: 1;
}

.container-up {
    background: linear-gradient(180deg, #8AA0DD 50%, rgba(138, 160, 221, 0.00) 100%);

    top: 0;

    transform: translateY(-50vh);
    opacity: 0;
}

.container-down,
.container-up {
    position: absolute;
    left: 0;

    width: 100vw;
    height: 50vh;

    pointer-events: none;
    will-change: transform, opacity;
}


.scrollbar-left {
    position: fixed;
    z-index: 5;
    left: 0;
    top: 0;

    height: 100vh;
    width: 1rem;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    pointer-events: none;
}

.scrollbar {
    position: fixed;
    z-index: 5;
    right: 0;
    top: 0;

    height: 100vh;
    width: 1rem;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    pointer-events: none;
}

.scroll-dot {
    width: 8px;
    height: 8px;

    opacity: 0;
}

.scroll-dot.is-visible {
    opacity: 1;
}

.compass-screen.is-walking-to-article {
    --article-split: 100%;

    background: linear-gradient(180deg,
            #8AA0DD 0%,
            #8AA0DD calc(var(--article-split) - 34%),

            #7E88C2 calc(var(--article-split) - 28%),
            #756B84 calc(var(--article-split) - 22%),

            #6C473A calc(var(--article-split) - 12%),
            #663024 var(--article-split),
            #663024 calc(var(--article-split) + 38%),

            #755349 calc(var(--article-split) + 46%),
            #9A7E77 calc(var(--article-split) + 54%),
            #D8CFCC calc(var(--article-split) + 62%),

            #FFFFFF calc(var(--article-split) + 70%));
}

.compass-screen.is-walking-to-article::before {
    display: none;
}

.compass-screen.is-walking-to-article .compass-oval {
    border: none;
}

.compass-screen.is-walking-to-article .target-compass,
.compass-screen.is-walking-to-article .dot,
.compass-screen.is-walking-to-article [data-compass-preview-description],
.compass-screen.is-walking-to-article [data-compass-question] {
    display: none !important;
}

.compass-screen.is-walking-to-article .compass-preview {
    opacity: 1;
    display: block;
}

.compass-screen.is-walking-to-article .compass-preview-head {
    top: 50%;
    transform: translateY(-50%);
    transition: top 450ms ease, transform 450ms ease;
}

.compass-screen.is-arriving-at-article .compass-preview-head {
    top: 4rem;
    transform: none;
}

.compass-screen.is-walking-to-article .meter-display {
    display: block;
    bottom: 4rem;
    z-index: 30;
    color: #663024;
}

.walk-to-article-label {
    margin-top: 0.2rem;
    color: #663024;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.1;
}

.article-footer {
    position: fixed;
    bottom: 0.7rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
}

.article-name {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    width: 100%;
    padding: 0 1rem 0 1rem;
    box-sizing: border-box;
}

.distance-field {
    position: relative;
    width: 4rem;
    /* gleiche Breite wie .toc */
    display: flex;
    justify-content: center;
    align-items: center;
}

.distance-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

.article-footer {
    position: fixed;
    z-index: 9999;
    width: 100vw;
    pointer-events: none;
}

.article-title {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 10000;
    transform: translateX(-50%);
    pointer-events: none;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    white-space: nowrap;
    text-align: center;
    margin: 0;
}

.article-title h2,
.article-name h2 {
    color: #fff;
}

body.is-article-screen .article-title h2,
body.is-article-screen .article-name h2 {
    color: #663024;
}

.compass-screen.is-walking-to-article~.article-footer .article-title h2,
.compass-screen.is-walking-to-article~.article-footer .article-name h2 {
    color: #663024;
}

[data-screen="tracing"] .article-gradient,
[data-screen="three-miles"] .article-gradient {
    top: 0 !important;
}