/* ===========================================================
   ABOUT
   Project history: one graphic, scrolled sideways.
   Tokens live in global.css.
=========================================================== */

.mbl-page-about .mbl-prose {
    padding-bottom: clamp(28px, 4vw, 40px);
}

.mbl-timeline {
    background: var(--mbl-white);
    /* The About prose already ends with space below the team. Don't add a second section pad. */
    padding-top: 0;
    padding-bottom: clamp(48px, 7vw, 80px);
}

.mbl-timeline .mbl-section-title {
    margin-bottom: 28px;
}

.mbl-timeline__stage {
    position: relative;
}

.mbl-timeline__scroller {
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    outline: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.mbl-timeline__scroller:focus-visible {
    outline: 2px solid var(--mbl-focus);
    outline-offset: -4px;
}

.mbl-timeline__scroller.is-dragging {
    cursor: grabbing;
}

html.js .mbl-timeline__scroller {
    scrollbar-width: none;
}

html.js .mbl-timeline__scroller::-webkit-scrollbar {
    display: none;
}

/* The global img rule would shrink this to the viewport and kill the scroll. */
.mbl-timeline__scroller img {
    width: auto;
    max-width: none;
    height: clamp(440px, 64vh, 680px);
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.mbl-timeline__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    width: clamp(28px, 5vw, 72px);
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mbl-timeline__fade--start {
    left: 0;
    opacity: 0;
    background: linear-gradient(to right, var(--mbl-white), transparent);
}

.mbl-timeline__fade--end {
    right: 0;
    background: linear-gradient(to left, var(--mbl-white), transparent);
}

.mbl-timeline.is-scrolled .mbl-timeline__fade--start {
    opacity: 1;
}

.mbl-timeline.is-at-end .mbl-timeline__fade--end {
    opacity: 0;
}

.mbl-timeline__btn {
    position: absolute;
    bottom: 16%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--mbl-ink);
    box-shadow: 0 10px 28px var(--mbl-shadow-lift);
    cursor: pointer;
}

.mbl-timeline__btn--prev {
    left: max(12px, calc(var(--mbl-gutter) - 8px));
}

.mbl-timeline__btn--next {
    right: max(12px, calc(var(--mbl-gutter) - 8px));
}

.mbl-timeline__btn:hover,
.mbl-timeline__btn:focus-visible {
    background: var(--mbl-white);
}

.mbl-timeline__btn:disabled {
    opacity: 0.28;
    cursor: default;
    box-shadow: none;
}

html:not(.js) .mbl-timeline__btn,
html:not(.js) .mbl-timeline__progress {
    display: none;
}

.mbl-timeline__progress {
    width: min(168px, 34vw);
    height: 2px;
    margin: 22px auto 0;
    background: var(--mbl-warm-grey);
    border-radius: 999px;
    overflow: hidden;
}

.mbl-timeline__progress-thumb {
    display: block;
    height: 100%;
    width: 18%;
    background: var(--mbl-ink);
    border-radius: inherit;
    transform: translateX(0);
}
